/* ---------- Global Styles ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}
body {
  line-height: 1.3;
  background-color: #f9f9f9;
  color: #333;
}
#toggle-btn {
  padding: 5px 5px;
  margin-left: 1rem;
  align-items: center;
  font-size: clamp(20px, 2vw, 24px);
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #fff;
  border-radius: 50%;
  color: #fff;
  transition: background-color 0.3s;
}
body.dark-mode #toggle-btn {
  background-color: gray;
  color: #333;
}

/* Dark Mode */
body.dark-mode {
  background-color: #1e1e1e;
  color: #f5f5f5;
}
body.dark-mode #home,
body.dark-mode #about,
body.dark-mode #projects,
body.dark-mode #contact {
  background-color: #1e1e1e; /* dark background for sections */
  color: #f5f5f5; /* light text */
}
body.dark-mode #home aside .btn {
  background-color: #fff;
}
body.dark-mode #about {
  background: #1e1e1e; /* dark background instead of gradient */
  color: #f5f5f5;
  /* text color */
}
body.dark-mode #about .social-icons a {
  color: #f39c12;
  box-shadow: 0px 0px 10px orange;
}
body.dark-mode #about .social-icons a:hover {
  color: green;
  box-shadow: 0px 0px 10px green;
}

body,
section,
header,
footer,
nav {
  transition: background-color 0.3s, color 0.3s;
}

header {
  padding: 0.5rem 0;
  align-items: center;
  display: flex;
  position: fixed;
  width: 100%;
  background: #222;
  color: #fff;
  top: 0;
  left: 0;
  z-index: 1000;
}
.logo {
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(orange, #222, #222);
  padding: 0 10px;
  border-radius: 10px;
  box-shadow: 0px 3px 5px;
}
nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
/* Burger styling (hidden on desktop, visible on mobile) */
.burger {
  display: none; /* hide on large screens */
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001; /* on top of sidebar */
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Burger animation when clicked */
.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  body.dark-mode nav ul li a {
    color: #fff !important;
  }
  body.dark-mode nav ul li a:hover {
    color: black !important;
  }
  nav ul {
    position: fixed;
    top: 0;
    right: -250px; /* hidden off-screen */
    width: 150px;
    height: 40%;
    flex-direction: column;
    gap: 5px;
    border-radius: 0px 20px 0px;
    transition: right 0.6s ease-in-out;
  }

  nav ul.active {
    right: 0; /* slide in */
  }

  nav ul li a {
    font-size: 1rem;
    color: #222 !important;
    font-weight: bold !important;
  }
  nav ul li {
    border-radius: 10px;
    border: 2px solid orange;
    width: 70%;
    padding-left: 1rem;
    background: rgba(233, 150, 7, 0.2); /* semi-transparent white */
    backdrop-filter: blur(70px); /* blur the background behind */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
  }
  nav ul li:hover {
    background: #fff;
  }
  nav {
    padding: 5px;
  }
  /* Show burger */
  .burger {
    display: flex;
    width: 2.3rem;
    height: 2rem;
    border: 1px solid orange;
    padding: 7px;
    border-radius: 4px;
  }
  .burger:hover {
    background: rgb(97, 66, 4);
  }
}
nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}

nav ul li {
  border: 1px solid orange;
  padding: 4px 13px;
  margin: 0 20px;
  border-radius: 10px;
  transition: transform 0.6s ease-in-out;
}
nav ul li:hover {
  box-shadow: 0px 0px 5px green;
  transform: scale(1.1);
  border: none;
}

nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #f5b041;
}

section {
  padding: 100px 5px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---------- Home Section ---------- */
#home {
  background-color: #fff;
  color: orange;
}

#home img {
  background-color: orange;
}
#about img {
  background-color: #fff;
}
#home img,
#about img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  margin-bottom: 3rem;
  max-width: 100%;
  height: auto;
  display: block;
}
.floating-img {
  animation: float 3s ease-in-out infinite;
}

/* floating animation */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

#home .span-name {
  font-size: clamp(20px, 3.5vw, 44px);
  font-weight: 700;
  margin-bottom: 10px;
}
#home .span2 {
  font-size: clamp(16px, 2vw, 30px);
  color: green;
  font-weight: 700;
}

#home p {
  font-size: clamp(12px, 2vw, 24px);
  max-width: 600px;
  margin-bottom: 20px;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  font-size: clamp(16px, 1.5vw, 34px);
  padding: 10px 20px;
  background: #222;
  color: #f39c12;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
  transition: color 1s ease-in-out;
  z-index: 1;
}
/* Create a pseudo-element for the sliding effect */
.btn::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 10%;
  height: 0%;
  background: green;
  z-index: 1;
  transition: height 0.6s ease-in-out;
}
.btn:hover::before {
  height: 100%;
}
:hover::before {
  height: 100%;
}

.btn:hover {
  color: #fff;
  color: orange;
  z-index: 3;
}
/* Create a pseudo-element for the sliding effect */
.btn::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: green;
  z-index: 1;
  transition: height 0.6s ease-in-out;
}

.btn:hover::before {
  height: 100%;
}

.btn:hover {
  color: #fff;
  color: orange;
  z-index: 3;
}
.btn .download-span {
  position: relative;
  z-index: 2; /* text stays visible above the white overlay */
}
.container {
  box-shadow: 5px 5px 5px black;
  border: 2px solid orange;
  padding: 1rem;
  display: flex;
  width: 90%;
  height: 80vh;
}
aside {
  align-items: center;

  flex: 40%;
}
aside,
article {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
article {
  padding: 1.3rem;
  flex: 60%;
}
article h1 {
  font-size: clamp(16px, 2vw, 30px);
}
article p {
  font-size: clamp(16px, 3vw, 24px) !important;
}
/* ---------- About Section ---------- */
#about {
  background: linear-gradient(135deg, #f5b041, #f39c12);
  background-color: #fff;
  text-align: center;
  color: #fff;
}
#about .container {
  border: 2px solid #fff;
}

#about h2 {
  margin-bottom: 20px;
}

.social-icons a {
  display: inline-block;
  font-size: 40px;
  box-shadow: 0px 0px 10px black;
  color: black;
  margin: 0 0.5rem;
  text-decoration: none;
  transition: transform 0.6s ease, color 0.3s ease;
  padding: 0 6px;
}

.social-icons a:hover {
  transform: translateY(-5px);
  color: green; /* optional: change color on hover */
  box-shadow: 0px 0px 10px green;
}
article .expertise {
  font-weight: bold;
}

/* ---------- Projects Section ---------- */

#projects {
  background-color: #f4f4f4;
  text-align: center;
}
/* --- FIXED RESPONSIVE PROJECT SECTION --- */
.project-container,
.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  padding: 1rem;
  height: auto; /* IMPORTANT FIX */
  border: 2px solid;
  box-shadow: 3px 2px 0px orange;
}

.project-box,
.project-box2 {
  width: clamp(250px, 45%, 400px); /* responsive width */
  height: 350px; /* fixed height so design stays nice */
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  box-shadow: 4px 5px 5px black;
  transition: transform 0.6s ease-in-out;
}
.project-box {
  background-image: url(photos/mock-up.png);
}
.project-box2 {
  background-image: url(photos/3rd-web-project.png);
}

.project-box:hover,
.project-box2:hover {
  transform: translateY(-15px);
}
.project-box a,
.project-box2 a {
  color: green;
  font-size: clamp(12px, 1vw, 24px);
  font-weight: bold;
}
.project-box a:hover,
.project-box2 a:hover {
  color: black;
}

@media (max-width: 768px) {
  .project-box,
  .project-box2 {
    width: 90%; /* full width on small screens */
    height: 200px;
  }
  .project-box a,
  .project-box2 a {
    padding-left: 40%;
  }
}

/* ---------- Contact Section ---------- */
body.dark-mode .contactdiv {
  background-color: #1e1e1e;
  color: orange;
}
body.dark-mode .contact-info a {
  color: #fff;
}
#contact {
  text-align: center;
  background-color: orange;
}
.contact-container {
  border: 2px solid #fff;
  background-color: lightslategray;
}

.contact-container2 {
  display: flex;
  width: 90%;
  height: auto;
}
.social-icons {
  display: flex;
}
.contact-container2 .social-icons a {
  color: orange;
  box-shadow: 0px 0px 10px;
  padding: 0 1rem;
  border-radius: 6px;
}
.contact-container2 .social-icons a:hover {
  color: lightslategray;
}
.contactdiv {
  background-color: #fff;
  width: 50%;
  padding: 2rem;
}
.contactdiv h2 {
  font-size: clamp(24px, 3vw, 44px);
  text-align: left;
}
.contact-info p {
  margin: 6px 0;
  font-size: 16px;
  text-align: left;
  padding-left: 1rem;
}

.contact-info a {
  text-decoration: none;
  color: #1e1e1e;
}
.contact-info a:hover {
  text-decoration: underline;
}

.contact-form {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
}

.contact-form label {
  font-weight: 600;
  text-align: left;
  font-size: clamp(14px, 1.2vw, 24px);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 3px solid orange;
  border-radius: 6px;
  font-size: clamp(14px, 1.2vw, 24px);
  background-color: lightslategray;
  color: #fff;
}

.contact-form textarea {
  height: 120px;
  resize: none;
}
.contact-form ::placeholder {
  color: #fff;
}

.btn-send {
  background: orange;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: clamp(14px, 1.2vw, 24px);
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.btn-send:hover {
  background: green;
}
/*--------------------Footer----------------*/
footer {
  text-align: center;
  padding: 15px;
  background: #222;
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }
  .container,
  .project-container {
    display: flex;
    flex-direction: column;
    text-align: justify;
    padding: 1rem;
  }
  #home img,
  #about img {
    margin-top: 3rem;
  }

  .project-container {
    display: flex;
    flex-direction: column;
  }
  .project-container h2 {
    text-align: center;
  }
  .project-box {
    margin-top: 0;
  }
  .project-box,
  .project-box2 {
    margin: 0 auto;
    width: 80%;
    height: 30vh;
  }
  .project-box:hover,
  .project-box2:hover {
    transform: translateY(-10px) scale(1.1);
  }
  .view-btn {
    display: none;
  }

  /*---------------------Contact-mobile-----------------*/
  .contact-container2 {
    display: flex;
    flex-direction: column;
  }
  .contactdiv {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 10px;
  }
  .contact-form input,
  .contact-form textarea {
    border: 2px solid orange;
    margin-bottom: 0;
  }
  .contactdiv h2 {
    text-align: center;
    color: orange;
    line-height: 3;
  }
  .contactdiv p {
    line-height: 1.5;
  }
  .contactdiv .social-icons a {
    font-size: 25px;
    margin: 0 auto 10px;
  }
  .contact-info p a {
    font-size: 14px;
  }
}
