/* =========================================================
   0. RESET & DESIGN TOKENS
   ========================================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --accent: #8400ff;
  --accent-glow: rgba(132, 0, 255, 0.6);
  --text-dark: #333;
  --text-muted: #6c757d;
  --bg: #ffffff;
  --hero-bg: #ffffff;
}

/* =========================================================
   1. GLOBAL & ANIMATIONS
   ========================================================= */
body {
  font-family: "Poppins", sans-serif;
  color: var(--text-dark);
  background: var(--bg);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; position: relative; }
.section-title { font-size: 36px; font-weight: 700; color: var(--accent); margin-bottom: 24px; }
.section-sub { font-size: 14px; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 12px; display: block; }

/* Scroll Animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}
.skills-grid .scroll-animate:nth-child(2),
.projects-grid .scroll-animate:nth-child(2),
.cert-grid .scroll-animate:nth-child(2) { transition-delay: 0.1s; }
.skills-grid .scroll-animate:nth-child(3),
.projects-grid .scroll-animate:nth-child(3),
.cert-grid .scroll-animate:nth-child(3) { transition-delay: 0.2s; }

/* =========================================================
   2. NAVBAR
   ========================================================= */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
}
.nav-container {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 70px;
}
.logo { font-size: 22px; font-weight: 700; color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  font-weight: 500; font-size: 16px; color: var(--text-dark);
  text-decoration: none; position: relative; transition: .3s;
}
.nav-links a::after {
  content: ""; position: absolute; bottom: -6px; left: 50%;
  width: 0; height: 2px; background: var(--accent); transition: .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { left: 0; width: 100%; }
#burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 0; }
#burger span { width: 24px; height: 3px; background: var(--text-dark); transition: .3s; }
@media(max-width: 768px) {
  .nav-links {
    position: fixed; top: 70px; right: -100%; flex-direction: column; gap: 18px; background: #fff;
    width: 200px; height: calc(100vh - 70px); padding: 30px 24px; box-shadow: -1px 0 6px rgba(0, 0, 0, .05); transition: .35s;
  }
  .nav-links.open { right: 0; }
  #burger { display: flex; }
  #burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  #burger.open span:nth-child(2) { opacity: 0; }
  #burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* =========================================================
   3. HERO SECTION
   ========================================================= */
.hero {
  background: var(--hero-bg); min-height: 100vh;
  display: flex; align-items: center; overflow: hidden;
}
.hero-wrapper {
  position: relative; z-index: 2; display: flex; align-items: center;
  justify-content: space-between; gap: 60px; width: 100%;
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.hero-left { flex: 1; color: #fff; }
.hero-greet { letter-spacing: 4px; font-size: 14px; color: var(--accent); }
.hero-title {
  font-size: 68px; line-height: 1.1; font-weight: 800; margin: 22px 0 48px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
.highlight { color: var(--accent); }
.rgb-text {
  background: linear-gradient(45deg, #ff00ff, #af00ff, #8400ff, #af00ff, #ff00ff);
  background-size: 400% 400%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: rgb-flow 6s ease infinite;
}
@keyframes rgb-flow {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}
.btn-primary {
  background: var(--accent); color: #fff; padding: 18px 50px; border: none;
  border-radius: 40px; font-weight: 600; font-size: 14px; letter-spacing: 2px;
  text-transform: uppercase; text-decoration: none; transition: all .3s;
  box-shadow: 0 0 15px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 25px var(--accent-glow), 0 0 40px rgba(132, 0, 255, 0.4);
}
.btn-outline{
  padding:12px 34px;border:2px solid var(--accent);border-radius:25px;
  font-size:16px;font-weight:500;color:var(--accent);text-decoration:none;transition:.3s;
}
.btn-outline:hover{background:var(--accent);color:#fff;}
.hero .btn-outline{padding:18px 50px;border-color:#fff;border-radius:40px;color:#fff;}
.hero .btn-outline:hover{background:#fff;color:#000;transform:translateY(-3px);}

/* Animated Hero Background */
.hero-bg-animation { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-bg-animation span {
  position: absolute; width: 40px; height: 40px;
  background: rgba(132, 0, 255, 0.1); border-radius: 50%;
  bottom: -50px; animation: floatUp 25s linear infinite;
}
@keyframes floatUp { to { transform: translateY(-105vh); } }
.hero-bg-animation span:nth-child(1) { left: 10%; animation-duration: 28s; animation-delay: 2s; }
.hero-bg-animation span:nth-child(2) { left: 20%; animation-duration: 15s; animation-delay: 5s; }
.hero-bg-animation span:nth-child(3) { left: 35%; animation-duration: 35s; animation-delay: 0s; }
.hero-bg-animation span:nth-child(4) { left: 50%; animation-duration: 22s; animation-delay: 8s; }
.hero-bg-animation span:nth-child(5) { left: 65%; animation-duration: 18s; animation-delay: 1s; }

/* Pulsating Purple Glow Photo Frame */
.photo-frame {
  position: relative; width: 350px; height: 350px;
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 20px 0px var(--accent-glow); }
  50% { box-shadow: 0 0 35px 8px var(--accent-glow); }
  100% { box-shadow: 0 0 20px 0px var(--accent-glow); }
}
.photo-frame img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 5px solid var(--hero-bg);
}
#about .photo-frame { animation: none; box-shadow: 0 0 35px 8px rgba(132, 0, 255, 0.885); }
#about .photo-frame img { border-color: var(--bg); }

@media(max-width: 768px) {
  .hero-wrapper { flex-direction: column-reverse; text-align: center; }
  .photo-frame { width: 280px; height: 280px; margin-bottom: 20px; }
  .hero-title { font-size: 54px; }
}

/* =========================================================
   4. ABOUT SECTION
   ========================================================= */
#about { background: var(--bg); }
.about-wrapper { display: flex; align-items: center; gap: 80px; flex-wrap: wrap; }
.about-img { flex: 0 0 350px; margin: 0 auto; }
.about-content { flex: 1; min-width: 300px; }
.typing-line {
  font-size: 20px; margin: 18px 0 32px;
  color: #ad18c4; font-weight: 600; line-height: 1.4;
  border:2px;
}
.cursor { display: inline-block; width: 1px; background: var(--accent); animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media(max-width: 768px) {
  .about-wrapper { text-align: center; }
  .about-img { flex-basis: 280px; height: 280px; }
}

/* =========================================================
   5. SKILLS SECTION
   ========================================================= */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 60px; margin-top: 50px; }
.skill-card {
  display: flex; flex-direction: column; background: #fff; border: 2px solid var(--accent);
  border-radius: 14px; overflow: hidden; box-shadow: 0 0 20px rgba(132,0,255,.15); transition: .35s;
}
.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 16px rgba(132,0,255,.6),0 0 32px rgba(132,0,255,.5),0 0 48px rgba(132,0,255,.4);
}
.skill-card img { width: 100%; height: 190px; object-fit: cover; }
.skill-card h3 { font-size: 22px; font-weight: 700; text-align: center; margin: 24px 20px 10px; }
.skill-card p { font-size: 15px; line-height: 1.6; text-align: center; margin: 0 22px 16px; color: var(--text-muted); }
.tech-badges { margin: 14px 0 24px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.tech-badges span {
  background: #a020f0; color: #fff; padding: 4px 12px; font-size: .75rem; border-radius: 14px; font-weight: 500;
  box-shadow: 0 0 6px rgba(162,32,240,.45); animation: badge-glow 2.4s ease-in-out infinite alternate;
}
@keyframes badge-glow { from { box-shadow: 0 0 6px rgba(162,32,240,.35); } to { box-shadow: 0 0 18px rgba(162,32,240,.85); } }

/* =========================================================
   6. PROJECTS SECTION
   ========================================================= */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 60px; margin-top: 40px; }
.project-card {
  background: #fff; border: 2px solid var(--accent); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 20px rgba(132,0,255,.15); transition: .35s; display: flex; flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 16px rgba(132,0,255,.6),0 0 32px rgba(132,0,255,.5),0 0 48px rgba(132,0,255,.4);
}
.project-card img { width: 100%; height: 200px; object-fit: cover; }
.project-card h3 { font-size: 20px; margin: 20px 20px 6px; }
.project-card .tech { font-size: 14px; margin: 0 20px 10px; color: var(--accent); font-weight: 600; }
.project-card .proj-desc { font-size: 15px; line-height: 1.55; margin: 0 20px 20px; color: var(--text-muted); flex-grow: 1; }
.project-btn {
  display: block; width: calc(100% - 40px); margin: 0 auto 24px; padding: 10px 0; text-align: center;
  background: var(--accent); color: #fff; border-radius: 6px; font-weight: 600; font-size: 14px;
  text-decoration: none; transition: .3s;
}
.project-btn:hover { background: #333; }

/* =========================================================
   7. CERTIFICATES SECTION
   ========================================================= */
/* =========================================================
   7. CERTIFICATES SECTION
   ========================================================= */
/* =========================================================
   7. CERTIFICATES SECTION (Updated)
   ========================================================= */
#certificates .container { 
  max-width: 1200px; /* wider container */
}

.cert-grid { 
  display: grid; 
  gap: 1.5rem; /* slightly smaller gap for more width */
  margin-top: 2rem; 
}

/* Desktop: 4 per row */
@media (min-width: 880px) {
  .cert-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}

/* Tablet: 2 per row */
@media (min-width: 600px) and (max-width: 879px) {
  .cert-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }
}

/* Mobile: 1 per row */
@media (max-width: 599px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}

.cert-card {
  background: #fff; 
  padding: 0.8rem; 
  border-radius: 12px; 
  border: 2px solid #9b00ff;
  box-shadow: 0 0 10px rgba(155,0,255,.45); 
  transition: .3s;
}

.cert-card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 0 20px #b100ff, 0 0 30px #9b00ff; 
}

.cert-card img {
  width: 100%; 
  height: 130px; /* reduced height */
  object-fit: cover; 
  border-radius: 8px; 
  margin-bottom: .6rem;
  box-shadow: 0 0 6px #8000ff80; 
  cursor: pointer;
}

.cert-card h3 { 
  font-size: 1rem; 
  font-weight: 700; 
  color: #2b003f; 
  margin-bottom: .4rem; 
}

.cert-card .cert-desc { 
  font-size: .85rem; 
  line-height: 1.4; 
  font-weight: 500; 
  color: var(--accent); 
}

/* Modal styles remain unchanged */
#cert-modal {
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,.85); 
  display: none;
  align-items: center; 
  justify-content: center; 
  z-index: 2000;
}

#cert-modal img { 
  max-width: 90%; 
  max-height: 80vh; 
  border-radius: 8px; 
  box-shadow: 0 0 20px #a100ff; 
}

.cert-nav {
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  background: #a100ff; 
  color: #fff;
  border: none; 
  padding: 10px 14px; 
  font-size: 1.3rem; 
  cursor: pointer; 
  border-radius: 50%;
  box-shadow: 0 0 12px #a100ffb0;
}

#cert-prev { left: 3%; }
#cert-next { right: 3%; }
#cert-close { 
  position: absolute; 
  top: 20px; 
  right: 28px; 
  font-size: 2rem; 
  color: #fff; 
  cursor: pointer; 
}

/* =========================================================
/* 8. CONTACT SECTION (FIXED WITH GLOW) */
.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 40px auto 0;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
  animation: pulse-glow 4s ease-in-out infinite; /* Purple glow animation */
}

/* Left side - Image full size */
.contact-img {
  flex: 1 1 400px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0; /* Remove padding so image fills space */
}

.contact-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fill container without distortion */
  border-radius: 0; /* No circle */
  box-shadow: 0 0 20px rgba(132, 0, 255, 0.6); /* Purple glow */
}

/* Right side - Contact form */
.contact-form {
  flex: 1 1 500px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  border: 1px solid #9422be;
  border-radius: 8px;
  background: #f8f9fa;
  transition: border-color .3s, box-shadow .3s;
  box-shadow: 0 0 10px 2px rgba(132, 0, 255, 0.25);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px 2px rgba(132, 0, 255, 0.25);
}

/* Send button */
.btn-send {
  align-self: flex-start;
  padding: 15px 40px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--accent-glow);
  transition: all .3s;
}

.btn-send:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(132, 0, 255, 0.8);
}

.form-status {
  margin-top: 10px;
  font-size: 15px;
}

/* Optional purple glow animation */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(132, 0, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 35px rgba(132, 0, 255, 0.9);
  }
}


/* =========================================================
   9. FOOTER
   ========================================================= */
.footer { text-align: center; padding: 40px 0; background: var(--hero-bg); color: var(--text-muted); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.social-links a {
  font-size: 28px; color: var(--accent); margin: 0 10px; transition: .3s ease;
}
.social-links a:hover {
  color: #fff; text-shadow: 0 0 6px #fff, 0 0 15px var(--accent);
  transform: translateY(-4px);
}
