/* === Base Styles === */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: #f2f2f2;
  color: #000;
  transition: background 0.5s, color 0.5s;
}

.dark-mode {
  background: #121212;
  color: #fff;
}

/* === Navbar === */
nav {
  position: sticky;
  top: 0;
  background: #1f4037;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
  padding: 4px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-img:hover {
  transform: rotate(10deg) scale(1.05);
  box-shadow: 0 0 12px #99f2c8;
}

.logo-text {
  font-size: 1.2em;
  font-weight: bold;
  color: white;
}

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

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a.active {
  border-bottom: 2px solid #99f2c8;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #99f2c8;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* === Header === */
header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, #1f4037, #99f2c8);
  color: white;
  text-align: center;
  padding: 80px 20px;
}

.header-content {
  position: relative;
  z-index: 1;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

h1 {
  font-size: 2.5em;
  transition: transform 0.2s ease;
}

h1 span, h2 {
  background: linear-gradient(90deg, #1f4037, #99f2c8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === Buttons === */
.btn {
  display: inline-block;
  margin: 10px;
  padding: 10px 20px;
  background: #1f4037;
  color: white;
  border: 2px solid #99f2c8;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  background: #99f2c8;
  color: #1f4037;
  box-shadow: 0 0 15px #99f2c8;
}

/* === Sections === */
section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
  transition: all 0.4s ease;
}

/* === Skills === */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.skills-list li {
  margin: 10px;
  padding: 10px 20px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* === Projects === */
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 50px 0;
  flex-wrap: wrap;
}

.project-row.reverse {
  flex-direction: row-reverse;
}

.project-img, .project-text {
  flex: 1;
  min-width: 300px;
  padding: 20px;
}

.project-img img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.project-row.reverse .project-img {
  display: flex;
  justify-content: flex-end;
}

.project-img img:hover {
  transform: scale(1.05);
}

.project-text {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.project-text h3 {
  margin-top: 0;
  font-size: 24px;
  color: #1f4037;
}

.project-text p {
  font-size: 16px;
  line-height: 1.6;
}

/* === Contact Form === */
.contact-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin-inline: auto;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  resize: vertical;
}

.contact-form textarea {
  min-height: 120px;
}

.contact-form .btn {
  align-self: flex-start;
  cursor: pointer;
}

/* === Footer === */
footer {
  background: #1f4037;
  color: white;
  text-align: center;
  padding: 40px 20px;
}

.footer-contact {
  margin-top: 10px;
}

.footer-contact a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* === Back to Top Button === */
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 30px;
  display: none;
  background: #1f4037;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* === Responsive Design === */
@media screen and (max-width: 768px) {
  .project-row {
    flex-direction: column;
  }

  nav .nav-links {
    flex-wrap: wrap;
    gap: 10px;
  }

  .project-img, .project-text {
    padding: 10px;
  }
}
