* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: #f9f9f9;
  color: #333;
  display: flex;
  /* Flex layout */
  flex-direction: column;
  /* Vertical stacking */
  min-height: 100vh;
  /* Full screen height */
}

main {
  flex: 1;
  /* Pushes footer to bottom */
}

/* ===== Header ===== */
header {
  background: #222;
  color: #fff;
  padding: 15px 50px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h2 {
  font-size: 22px;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
  font-size: 14px;
}

nav a:hover {
  color: #1e90ff;
}

/* ===== Hero ===== */
.hero {
  display: flex;
  position: relative;
  background-color: #3d3938;
  z-index: 1;
  padding-top: 62px;
  padding-left: 62px;
  padding-bottom: 2px;
}

.box {
  background-color: #3d3938;
  color: white;
  padding: 7px 12px;
  margin: 0px;
  text-align: justify;
  position: relative;
}

.left-side {
  padding-top: 4%;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #1e90ff;
  color: #fff;
  border-radius: 40px;
  text-decoration: none;
  transition: background 0.3s;
  margin-top: 30px;
}

.btn:hover {
  background: green;
}

/* ===== About ===== */
#about {
  top: -18px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  padding: 40px;
  background: #fff;
}

.resume-btn {
  display: inline-block;
  background: #1e90ff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 30px;
}

.resume-btn:hover {
  background: green;
}

/* ===== Skills ===== */
#skills {
  background: #f4f4f9;
  padding: 60px 40px;
  text-align: center;
}

#skills h2 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #222;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: auto;
}

.skill-card {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(18, 17, 17, 0.733);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: left;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.skill-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #1e90ff;
}

.skill-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

/* ===== Projects ===== */
#project {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

.projects-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.project-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.881);
  overflow: hidden;
  width: 300px;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 20px;
  text-align: left;
}

.project-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: #007bff;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.project-btn:hover {
  background: #0056b3;
}

/* ===== Contact ===== */
#contact {
  background: #bbd5efa8;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  clear: both;
  z-index: 1;
  margin-top: 40px;
}

.contact-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 50px;
  max-width: 1100px;
  margin: auto;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.contact-info h2 {
  font-size: 2rem;
  color: #222;
  margin-bottom: 15px;
}

.contact-info p {
  color: #555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.contact-buttons {
  margin-top: 20px;
}

.contact-btn {
  display: inline-block;
  margin: 8px 10px 0 0;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

.contact-btn.email {
  background: #007bff;
  color: #fff;
}

.contact-btn.whatsapp {
  background: #25d366;
  color: #fff;
}

.contact-btn.linkedin {
  background: #0077b5;
  color: #fff;
}

.contact-btn.instagram {
  background: #E1306C;
  color: #fff;
}

.contact-btn.instagram:hover {
  background: #C13584;
}

.contact-btn:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.contact-form {
  flex: 1;
  min-width: 280px;
  background: #f9f9f9;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0, 0, 0);
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #007bff;
}

.submit-btn {
  padding: 12px;
  background: #007bff;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-btn:hover {
  background: #0056b3;
}

/* ===== Footer ===== */
section {
  width: 100%;
  display: block;
  position: relative;
}

footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  margin-top: auto;
  position: relative;
  z-index: 2;
  width: 100%;
}

footer p {
  margin: 0;
  font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  header {
    padding: 15px 30px;
  }

  nav a {
    margin: 0 10px;
    font-size: 13px;
  }

  .hero {
    flex-direction: column;
    padding-left: 20px;
    padding-top: 75px;
    padding-bottom: 20px;
    text-align: center;
  }

  .left-side,
  .box img {
    width: 100%;
    padding: 10px;
  }

  #about {
    flex-direction: column;
    padding: 30px 20px;
    text-align: center;
    margin-top: -29px;
  }

  #about img {
    width: 80%;
    margin-bottom: 20px;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }

  .projects-container {
    flex-direction: column;
    align-items: center;
  }

  .contact-container {
    flex-direction: column;
    gap: 30px;
    text-align: center;
    align-items: center;
  }

  .contact-form,
  .contact-info {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header h2 {
    font-size: 18px;
  }

  #about {
    margin-top: -25px;
  }

  nav a {
    font-size: 12px;
    margin: 0 5px;
  }

  nav {
    flex-direction: column;
  }

  .project-card {
    width: 100%;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero .box {
    padding: 5px 8px;
    font-size: 14px;
  }

  .btn,
  .resume-btn,
  .project-btn,
  .submit-btn,
  .contact-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  #skills h2,
  #project h2,
  #contact h2 {
    font-size: 22px;
  }

  .skill-card h3,
  .project-card h3 {
    font-size: 18px;
  }

  .skill-card p,
  .project-content p,
  .contact-info p {
    font-size: 13px;
  }

  #about img {
    width: 100%;
  }
}

/* ===== Mobile Nav ===== */
.nav-toggle {
  display: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    padding: 15px 20px;
    height: auto;
    position: relative;
  }

  header h2 {
    flex: 1 1 100%;
    text-align: center;
    font-size: 16px;
    margin-bottom: 10px;
  }

  .nav-toggle {
    display: block;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    order: 2;
    z-index: 10;
    position: relative;
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    position: relative;
    order: 3;
    background: #222;
    padding: 10px 0;
    border-radius: 0;
    z-index: 5;
  }

  nav.active {
    display: flex;
  }

  nav a {
    margin: 10px 0;
    text-align: center;
  }

  projects-container {
    flex-direction: column;
    gap: 20px;
  }
}