/* ========== RESET & VARIABLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #14b8a6;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
  --gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --border: #334155;
  --card-bg: #1e293b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; }

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

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

.section { padding: 100px 0; }

/* ========== LOADER ========== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; }
.loader-circle {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}
.loader-content p {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 24px;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
[data-theme="dark"] .navbar { background: rgba(15, 23, 42, 0.85); }

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}
.logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  transition: var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 15px; }

.theme-toggle {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
}
.theme-toggle:hover { background: var(--primary); color: #fff; transform: rotate(15deg); }

.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text);
  transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
  z-index: -1;
}
.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-greeting { font-size: 18px; color: var(--text-light); margin-bottom: 10px; }
.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 15px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  min-height: 40px;
}
.cursor { animation: blink 1s infinite; color: var(--primary); }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 30px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.btn {
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 15px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(99, 102, 241, 0.5); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }

.hero-socials { display: flex; gap: 15px; }
.hero-socials a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.hero-socials a:hover { background: var(--gradient); color: #fff; transform: translateY(-5px); }

.hero-image { display: flex; justify-content: center; }
.image-wrapper {
  position: relative;
  width: 380px;
  height: 380px;
}
.blob {
  position: absolute;
  inset: 0;
  background: var(--gradient);
  border-radius: 50% 30% 60% 40%;
  animation: morph 8s ease-in-out infinite;
  z-index: 1;
}
@keyframes morph {
  0%, 100% { border-radius: 50% 30% 60% 40%; }
  50% { border-radius: 30% 60% 40% 50%; }
}
.image-wrapper img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50% 30% 60% 40%;
  position: absolute;
  top: 5%;
  left: 5%;
  z-index: 2;
  animation: morph 8s ease-in-out infinite;
}
.floating-badge {
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow);
  z-index: 3;
  animation: float 3s ease-in-out infinite;
}
.badge-1 { top: 10%; left: -10px; color: #61dafb; }
.badge-2 { bottom: 20%; right: -10px; color: #f24e1e; animation-delay: 1s; }
.badge-3 { bottom: -5%; left: 30%; color: #f7df1e; animation-delay: 2s; }
@keyframes float { 50% { transform: translateY(-15px); } }

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 40px;
  border: 2px solid var(--text-light);
  border-radius: 20px;
  display: flex;
  justify-content: center;
}
.scroll-indicator span {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: 6px;
  animation: scroll 2s infinite;
}
@keyframes scroll { 0%,100% {transform:translateY(0); opacity:1;} 50%{transform:translateY(15px); opacity:0;} }

/* ========== SECTION HEADER ========== */
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
}

/* ========== ABOUT ========== */
.about { background: var(--bg-alt); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.about-text h3, .about-info h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text);
}
.about-text p {
  color: var(--text-light);
  margin-bottom: 15px;
  font-size: 16px;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 30px;
}
.stat-box {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-box h4 {
  font-size: 32px;
  font-weight: 700;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-box p { color: var(--text-light); font-size: 14px; }

/* Timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-dot {
  position: absolute;
  left: -30px;
  top: 5px;
  width: 18px;
  height: 18px;
  background: var(--gradient);
  border-radius: 50%;
  border: 3px solid var(--bg);
}
.timeline-date {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.timeline-content h4 { font-size: 18px; margin-bottom: 5px; }
.timeline-content p { color: var(--text-light); font-size: 14px; }
.timeline-content small { color: var(--text-light); font-size: 13px; }

/* ========== SKILLS ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}
.skill-category {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.skill-category:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.skill-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  margin-bottom: 20px;
}
.skill-category h3 { font-size: 20px; margin-bottom: 15px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  background: var(--bg-alt);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
}

/* ========== EXPERIENCE ========== */
.experience { background: var(--bg-alt); }
.exp-timeline { max-width: 900px; margin: 0 auto; }
.exp-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 25px;
  border-left: 4px solid var(--primary);
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.exp-header h3 { font-size: 22px; color: var(--text); }
.exp-company {
  color: var(--primary);
  font-weight: 600;
  margin-top: 5px;
}
.exp-mode {
  background: var(--bg-alt);
  color: var(--text-light);
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 12px;
  margin-left: 8px;
}
.exp-date {
  background: var(--gradient);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
}
.exp-points { list-style: none; margin-bottom: 15px; }
.exp-points li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--text-light);
  font-size: 15px;
}
.exp-points li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.exp-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.exp-tech span {
  background: var(--bg-alt);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
}

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.project-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.project-img {
  height: 200px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.project-icon-bg {
  font-size: 80px;
  color: rgba(255, 255, 255, 0.9);
}
.project-body { padding: 25px; }
.project-category {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.project-body h3 { font-size: 20px; margin-bottom: 10px; }
.project-body > p {
  color: var(--text-light);
  margin-bottom: 15px;
  font-size: 14px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}
.project-tags span {
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
}
.project-links { display: flex; gap: 15px; }
.project-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.project-link:hover { color: var(--secondary); }

/* ========== CERTIFICATIONS ========== */
.certifications { background: var(--bg-alt); }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.cert-card {
  background: var(--card-bg);
  padding: 30px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.cert-card:hover { transform: translateY(-8px); border-color: var(--primary); }
.cert-card i {
  font-size: 50px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
}
.cert-card h4 { font-size: 17px; margin-bottom: 5px; }
.cert-card p { color: var(--text-light); font-size: 14px; margin-bottom: 8px; }
.cert-card small {
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  color: var(--text);
}

/* ========== LEADERSHIP ========== */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}
.leader-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.leader-card:hover { transform: translateY(-8px); }
.leader-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  margin-bottom: 18px;
}
.leader-card h3 { font-size: 19px; margin-bottom: 5px; }
.leader-org { color: var(--primary); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.leader-card > p { color: var(--text-light); font-size: 14px; }

/* ========== CONTACT ========== */
.contact { background: var(--bg-alt); }
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-info h3 { font-size: 26px; margin-bottom: 15px; }
.contact-info > p { color: var(--text-light); margin-bottom: 30px; }
.contact-items { margin-bottom: 30px; }
.contact-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
}
.contact-item i {
  width: 50px;
  height: 50px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.contact-item h4 { font-size: 15px; margin-bottom: 3px; }
.contact-item a, .contact-item p {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
}
.contact-item a:hover { color: var(--primary); }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 45px;
  height: 45px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}
.social-links a:hover { background: var(--gradient); color: #fff; transform: translateY(-5px); }

.contact-form {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.form-group { position: relative; margin-bottom: 20px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group label {
  position: absolute;
  top: 14px;
  left: 14px;
  color: var(--text-light);
  pointer-events: none;
  background: var(--card-bg);
  padding: 0 5px;
  transition: var(--transition);
}
.form-group input:focus ~ label,
.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 10px;
  font-size: 12px;
  color: var(--primary);
}
.contact-form button { width: 100%; justify-content: center; }
#formStatus { margin-top: 15px; text-align: center; font-weight: 500; }

/* ========== FOOTER ========== */
.footer {
  background: var(--text);
  color: #fff;
  padding: 25px 0;
  text-align: center;
}
[data-theme="dark"] .footer { background: #000; }
.footer p { font-size: 14px; }

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 50;
  box-shadow: var(--shadow-lg);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px); }

/* ========== RESPONSIVE ========== */
@media (max-width: 968px) {
  .hero-container, .about-grid, .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-name { font-size: 48px; }
  .hero-title { font-size: 22px; }
  .image-wrapper { width: 280px; height: 280px; }
  .section-title { font-size: 32px; }
  .section { padding: 70px 0; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: var(--card-bg);
    width: 250px;
    height: calc(100vh - 70px);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
  }
  .nav-links.active { right: 0; }
  .hero-name { font-size: 38px; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .btn { justify-content: center; }
  .about-stats { grid-template-columns: 1fr; }
  .exp-header { flex-direction: column; }
  .section-title { font-size: 28px; }
  .image-wrapper { width: 240px; height: 240px; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 32px; }
  .section-title { font-size: 24px; }
  .contact-form { padding: 25px; }
}