/* ========== GLOBAL STYLES ========== */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: #fff;
  scroll-behavior: smooth;
  position: relative;
  z-index: 0;
}

/* Slideshow background (no transition) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  z-index: -2;
  animation: slideshow 25s steps(1) infinite;
}

/* Black overlay */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* black faded overlay */
  z-index: -1;
}

/* Keyframes for slideshow */
@keyframes slideshow {
  0%   { background-image: url('images/bg.jpg'); }
  25%  { background-image: url('images/bg8.avif'); }
  50%  { background-image: url('images/bg14.png'); }
  75%  { background-image: url('images/bg12.jpg'); }
  100% { background-image: url('images/bg9.jpg'); }
}

/* (all the rest remains unchanged) */
section {
  padding: 100px 40px;
}

.section-heading {
  text-align: center;
  font-size: 2.2rem;
  color: #39ff14;
  text-shadow: 0 0 10px #39ff14;
  margin-bottom: 40px;
}

/* ========== NAVBAR ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(57, 255, 20, 0.3);
}

nav h1 {
  font-size: 1.5rem;
  margin: 0;
  color: white;
}

nav h1 span {
  color: #39ff14;
  text-shadow: 0 0 10px #39ff14;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav-links li a {
  color: #39ff14;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #fff;
}

/* ========== HOME SECTION ========== */
.main-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 120px;
  min-height: 100vh;
  flex-wrap: wrap;
}

.profile-pic img {
  border-radius: 50%;
  width: 300px;
  height: 300px;
  object-fit: cover;
  box-shadow: 0 0 50px #39ff14, 0 0 80px #39ff14;
  background-color: black;
}

.intro {
  max-width: 600px;
}

.intro h2 {
  font-size: 2rem;
}

.intro h2 span {
  color: #39ff14;
  text-shadow: 0 0 10px #39ff14;
}

.intro h1 {
  font-size: 2.5rem;
  margin: 10px 0;
}

.intro h1 span {
  color: #39ff14;
}

.typing-text {
  font-size: 2.5rem;
  font-weight: bold;
  color: #39ff14;
  white-space: nowrap;
  border-right: 2px solid #39ff14;
  overflow: hidden;
  width: 0;
  animation: typing 4s steps(40, end) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.intro p {
  font-size: 1rem;
  line-height: 1.6;
}

/* ========== ABOUT SECTION ========== */
#about {
  max-width: 900px;
  margin: auto;
  text-align: justify;
  line-height: 1.8;
  font-size: 1rem;
}

/* ========== SKILLS SECTION ========== */
#skills {
  max-width: 900px;
  margin: auto;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.skill {
  margin: 20px 0;
}

.skill span {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
  color: #39ff14;
}

.bar {
  background: #222;
  width: 100%;
  height: 25px;
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  background: #39ff14;
  height: 100%;
  width: 0%;
  box-shadow: 0 0 15px #39ff14;
  border-radius: 5px;
  transition: width 2s ease-in-out;
}

.active-bar {
  width: var(--target-width);
}

/* ========== CERTIFICATES SECTION ========== */
#certifications {
  text-align: center;
}

.slideshow-container {
  position: relative;
  width: 80%;
  max-width: 800px;
  margin: auto;
  overflow: hidden;
  border: 3px solid #39ff14;
  border-radius: 12px;
  box-shadow: 0 0 20px #39ff14;
  height: 400px;
}

.cert-slide {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 12px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.3s ease;
  user-select: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* ========== CONTACT SECTION ========== */
#contact {
  text-align: center;
  background-color: #111;
}

form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: auto;
  gap: 15px;
}

input,
textarea {
  padding: 12px;
  border: none;
  border-radius: 5px;
  background-color: #222;
  color: #fff;
  resize: none;
  font-size: 1rem;
}

button {
  padding: 12px;
  background-color: #39ff14;
  border: none;
  color: black;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

button:hover {
  background-color: #2bdc0f;
}

/* ========== SOCIAL ICONS ========== */
.social-links {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.social-links a {
  border: 2px solid #39ff14;
  border-radius: 50%;
  padding: 12px;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.4s ease;
  box-shadow: 0 0 15px #39ff14, inset 0 0 10px #39ff14;
}

.social-links a img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 6px #39ff14);
}

.social-links a:hover {
  transform: scale(1.2);
  box-shadow: 0 0 30px #39ff14, inset 0 0 30px #39ff14;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: center;
    padding: 15px;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
  }

  .main-container {
    flex-direction: column;
    text-align: center;
    padding: 80px 20px;
  }

  .profile-pic img {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
  }

  .intro h1 {
    font-size: 2.5rem;
  }

  .typing-text {
    font-size: 2.5rem;
  }

  section {
    padding: 80px 20px;
  }

  .slideshow-container {
    height: 300px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
