* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  color: var(--primary-color);
  margin-bottom: 0.8em;
  line-height: 1.3;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 2.2rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
}

p {
  margin-bottom: 1.2em;
  /* line-height: 35px; */
}


:root {
  --primary-color: #0a2540;
  --secondary-color: #0862c9;
  --accent-color: #ff7f50;
  --text-light: #f7fafc;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.233);
  --card-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
  --font-primary: "Poppins", sans-serif;
  --font-secondary: "Lato", sans-serif;
  --header-height: 70px;
}

/* navbar====================================================================== */

nav {
  padding: 5px 5%;
  display: flex;
  position: fixed;

  width: 100%;
  top: 0;
  background-color: white;

  justify-content: space-around;
  gap: 280px;
  align-items: center;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
    rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
  z-index: 1;
}
nav .logo {
  display: flex;
  align-items: center;
}
nav .logo h1 {
  font-size: 1.5rem;
  padding-top: 14px;

  background-color: var(--primary-color);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul {
  list-style: none;
  display: flex;
}
nav ul li {
  margin-left: 1.5rem;
}
nav ul li a {
  text-decoration: none;
  color: #000;
  font-size: 98%;
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 5px;
}

nav ul li a:hover {
  /* background-color: #f5f2f2; */
  background-color: rgb(19, 173, 147);
  color: white;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger .line {
  width: 25px;
  height: 1px;
  background-color: #1f1f1f;
  display: block;
  margin: 7px auto;
  transition: all 0.3s ease-in-out;
}
.hamburger-active {
  transition: all 0.3s ease-in-out;
  transition-delay: 0.6s;
  transform: rotate(45deg);
}

.hamburger-active .line:nth-child(2) {
  width: 0px;
}

.hamburger-active .line:nth-child(1),
.hamburger-active .line:nth-child(3) {
  transition-delay: 0.3s;
}

.hamburger-active .line:nth-child(1) {
  transform: translateY(12px);
}

.hamburger-active .line:nth-child(3) {
  transform: translateY(-5px) rotate(90deg);
}

.menubar {
  position: fixed;
  top: 0;
  left: -60%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 60%;
  height: 100vh;
  padding: 20% 0;
  background: rgba(255, 255, 255);
  transition: 0.3s;
  z-index: 2;
}
.active {
  left: 0;
  box-shadow: rgba(12, 1, 1, 0.89) 10px 0px 400px;
}

.menubar ul {
  padding: 0;
  list-style: none;
}
.menubar ul li {
  margin-bottom: 32px;
}

.menubar ul li a {
  text-decoration: none;
  color: #000;
  font-size: 95%;
  font-weight: 400;
  padding: 5px 10px;
  transition: 0.3s;
  border-radius: 5px;
}

.menubar ul li a:hover {
  margin-left: 4px;
}

/* --- Layout & Container --- */
.container {
  /* width: 90%; */
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 76px 0;
}
#about,
#services,
#testimonials {
  background-color: var(--bg-light);
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px auto;
  font-size: 1.1rem;
  color: #555;
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 25px;
  /* Rounded buttons */
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease,
    box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.btn i {
  margin-clfa-arrow-alt-circle-right: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 196, 154, 0.3);
  /* Teal shadow */
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
  transform: translateY(-2px);
}

.btn-link {
  color: var(--secondary-color);
  font-weight: 600;
}

.btn-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.btn-link i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.btn-link:hover i {
  transform: translateX(3px);
}

/* --- Hero Section================================================================================================== --- */
.hero-section {
  min-height: 80vh;
  /* At least 80% of viewport height */
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  padding-top: 100px;
  /* Account for fixed header */
  /* background: linear-gradient(45deg, rgba(10, 37, 64, 0.05), rgba(0, 196, 154, 0.05)); */
  /* Subtle gradient */
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 40px;
  /* Space between text and optional graphic */
}
.hero-content img {
  margin-top: 40px;
}

.hero-title {
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.hero-description {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 30px;
  line-height: 34px;
}

.hero-buttons {
  display: flex;
  box-shadow: none;
  gap: 15px;
}
.hero-buttons a {
  color: black;
  border: 1.7px solid;
}
.hero-buttons a:hover {
  border: none;

  background-color: rgb(19, 173, 147);
  color: white;
}

/* --- About Section ===============================================================================================================--- */
#about {
  /* background: linear-gradient(45deg, rgba(10, 37, 64, 0.05), rgba(0, 196, 154, 0.05)); */
}
.about-container {
  display: flex;
  align-items: center;
  /* background: linear-gradient(45deg, rgba(10, 37, 64, 0.05), rgba(0, 196, 154, 0.05)); */
  gap: 50px;
  /* background: white; */
}

.about-image {
  flex-basis: 65%;
}

.about-image img {
  border-radius: 10px;
  /* box-shadow: var(--card-shadow); */
}

.about-text {
  flex-basis: 100%;
}

.about-text ul {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 15px;
  gap: 20px;
  padding-left: 5px;
}

.about-text li {
  margin-bottom: 10px;
  display: flex;
  padding: 20px;
  gap: 6px;
  align-items: center;
  border-bottom: 2px solid rgb(19, 173, 147);
}

/* --- Skills Section ============================================================================================================--- */
.skills-section {
  border-bottom: 2px solid rgba(28, 40, 48, 0.091);
}

.skills-grid {
  display: grid;
  /* Adjusted to fit 5 categories nicely on wider screens */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.skill-category {
  background-color: var(--bg-white);
  /* Cards on light bg */
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  border-bottom: 2px solid rgb(4, 120, 152);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.skill-category h3 i {
  color: var(--secondary-color);
}

.skill-category ul {
  padding-left: 5px;
}

.skill-category li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.skill-category li i {
  color: var(--secondary-color);
  width: 16px;
  text-align: center;
}

/* --- projects Section ===========================================================================================================--- */
#projects {
  /* background: linear-gradient(45deg, rgba(10, 37, 64, 0.053), rgba(0, 196, 154, 0.057)); */
}
.projects-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.projects-item {
  /* Style as <article> */
  background-color: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  /* Clip image corners */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.projects-item:hover {
  /* transform: translateY(-5px); */
  box-shadow: var(--card-shadow-hover);
}

.projects-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Maintain aspect ratio */
  object-fit: cover;
}

.projects-item-content {
  padding: 20px;
  flex-grow: 1;
  
  display: flex;
  flex-direction: column;
}

.projects-item-content h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.projects-item-content p {
  flex-grow: 1;
  margin-bottom: 15px;
  font-size: 0.95rem;
  line-height: 34px;
}

.projects-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
}

.projects-tags span {
  background-color: var(--bg-light);
  color: var(--secondary-color);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.projects-item .btn-link {
  margin-top: auto;
}

/* --- Footer =======================================================================================================================--- */
footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 30px 0;
  text-align: center;
  /* margin-top: 60px; */
  /* Space above footer */
}

.footer-container p {
  margin-bottom: 8px;
  font-size: 1rem;
  opacity: 0.9;
}

/* contact section  =================================================================================================================     */
.con {
  position: relative;
  /* width: 100%; */
  min-height: 100vh;
  /* padding:2rem; */
  background-color: #fafafa;
  /* border: 1px solid black; */
  display: flex;
  align-items: center;
  justify-content: center;
}
#contact {
  /* padding-left: 15px; */
}
.form {
  /* padding: 20px; */
  transform: translateY(10px);
  margin-top: 10px;
  width: 100%;
  max-width: 1140px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.1);
  /* z-index: 1000; */
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.contact-form {
  /* background-color: #1abc9c; */
  background-color: #3b5998;
  position: relative;
}

.circle {
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 20%, #516da9);
  position: absolute;
}

.circle.one {
  width: 130px;
  height: 130px;
  top: 130px;
  right: -40px;
}

.circle.two {
  width: 80px;
  height: 80px;
  top: 10px;
  right: 30px;
}

.contact-form:before {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  background-color: #3b5998;
  transform: rotate(45deg);
  top: 50px;
  left: -13px;
}

form {
  padding: 2.3rem 2.2rem;
  z-index: 10;
  overflow: hidden;
  position: relative;
}

.title {
  color: #fff;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.7rem;
}

.input-con.con {
  position: relative;
  margin: 1rem 0;
}

.input {
  width: 94%;
  outline: none;
  border: 2px solid #fafafa;
  background: none;
  padding: 0.6rem 1.2rem;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border-radius: 10px;
  transition: 0.3s;
}

textarea.input {
  padding: 0.8rem 1.2rem;
  min-height: 150px;
  border-radius: 10px;
  resize: none;
  overflow-y: auto;
}

.input-con.con label {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  padding: 0 0.4rem;
  color: #fafafa;
  font-size: 0.9rem;
  font-weight: 400;
  pointer-events: none;
  z-index: 1000;
  transition: 0.5s;
}

.input-con.con.textarea label {
  top: 1rem;
  transform: translateY(0);
}

.btn {
  padding: 0.6rem 1.3rem;
  background-color: #fff;
  border: 2px solid #fafafa;
  font-size: 0.95rem;
  color: #3b5998;
  line-height: 1;
  border-radius: 25px;
  outline: none;
  cursor: pointer;
  transition: 0.3s;
  margin: 0;
}

.btn:hover {
  background-color: transparent;
  color: #fff;
}

.input-con.con span {
  position: absolute;
  top: 0;
  left: 25px;
  transform: translateY(-50%);
  font-size: 0.8rem;
  padding: 0 0.4rem;
  color: transparent;
  pointer-events: none;
  z-index: 500;
}

.input-con.con span:before,
.input-con.con span:after {
  content: "";
  position: absolute;
  width: 10%;
  opacity: 0;
  transition: 0.3s;
  height: 5px;
  background-color: #3b5998;
  top: 50%;
  transform: translateY(-50%);
}

.input-con.con span:before {
  left: 50%;
}

.input-con.con span:after {
  right: 50%;
}

.input-con.con.focus label {
  top: 0;
  transform: translateY(-50%);
  left: 25px;
  font-size: 0.8rem;
}

.input-con.con.focus span:before,
.input-con.con.focus span:after {
  width: 50%;
  opacity: 1;
}

.contact-info {
  padding: 2.3rem 2.2rem;
  position: relative;
}

.contact-info .title {
  color: #1abc9c;
}

.text {
  color: #333;
  margin: 1.5rem 0 2rem 0;
}

.information {
  display: flex;
  gap: 8px;
  color: #555;
  /* border: 1px solid black; */
  margin: 0.7rem 0;
  /* align-items: center; */
  font-size: 0.95rem;
}
.information i {
  transform: translateY(7px);
}

.icon {
  width: 28px;
  margin-right: 0.7rem;
}

.social-media {
  padding: 2rem 0 0 0;
}

.social-media p {
  color: #333;
}

.social-icons {
  display: flex;
  margin-top: 0.5rem;
}

.social-icons a {
  width: 35px;
  height: 35px;
  border-radius: 5px;
  background: linear-gradient(45deg, #345db3, #1f3b79);
  color: #ffffff;
  text-align: center;
  line-height: 35px;
  margin-right: 0.5rem;
  transition: 0.3s;
}

.social-icons a:hover {
  transform: scale(1.05);
}

.contact-info:before {
  content: "";
  position: absolute;
  width: 110px;
  height: 100px;
  border: 22px solid #3b5998;
  border-radius: 50%;
  bottom: -77px;
  right: 50px;
  opacity: 0.3;
}

.big-circle {
  position: absolute;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #3b5998, #3b5998);
  bottom: 67%;
  right: 56%;
  transform: translate(-40%, 38%);
}

.big-circle:after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  background-color: #ffffff;
  border-radius: 50%;
  top: calc(50% - 190px);
  left: calc(50% - 190px);
}

.square {
  position: absolute;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(181%, 11%);
  opacity: 0.2;
}


input::placeholder {
  color: rgb(215, 215, 215);
}
textarea::placeholder {
  color: rgb(215, 215, 215);
}

/* responsive css =========================================================================================================*/

@media screen and (max-width: 934px) {
  .hamburger {
    display: block;
  }
  nav {
    background: transparent;
    backdrop-filter: blur(40px);
    gap: 160px;

    /* transition: .1s; */
  }
  nav .logo h1 {
    padding-top: 14px;
    font-size: 28px;
  }
  nav ul {
    display: none;
  }
}

@media (max-width: 850px) {
  .form {
    grid-template-columns: 1fr;
  }

  .contact-info:before {
    bottom: initial;
    top: -75px;
    right: 65px;
    transform: scale(0.95);
  }

  .contact-form:before {
    top: -13px;
    left: initial;
    right: 70px;
  }

  .square {
    transform: translate(140%, 43%);
    height: 350px;
  }

  .big-circle {
    bottom: 75%;
    transform: scale(0.9) translate(-40%, 30%);
    right: 50%;
  }

  .text {
    margin: 1rem 0 1.5rem 0;
  }

  .social-media {
    padding: 1.5rem 0 0 0;
  }
}

@media (max-width: 480px) {
  .con {
    /* padding: 1.5rem; */
  }
  #contid{
    /* width: 100%; */
    /* padding: 0; */
  }
  #contid h2{
    /* padding-left: 22px; */
  }
  .hero-content img {
    margin-top: 20px;
  }

  .contact-info:before {
    display: none;
  }

  .square,
  .big-circle {
    display: none;
  }

  form,
  .contact-info {
    padding: 1.7rem 1.6rem;
  }

  .text,
  .information,
  .social-media p {
    font-size: 0.96rem;
  }

  .title {
    font-size: 1.15rem;
  }

  .social-icons a {
    width: 30px;
    height: 30px;
    line-height: 30px;
  }

  .icon {
    width: 23px;
  }

  .input {
    padding: 0.45rem 1.2rem;
  }

  .btn {
    padding: 0.45rem 1.2rem;
  }
}

@media (max-width: 992px) {
  .container {
    width: 95%;
  }

  h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  section {
    padding: 60px 0;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  /* Revert to wider columns if needed */
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .header-container {
    padding: 0 15px;
  }

  /* Ensure padding for nav items */
  #main-nav {
    /* Start hiding nav for mobile */
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    /* Hidden */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
  }

  #main-nav.active {
    max-height: 500px;
    /* Or enough height */
  }

  /* Show menu */
  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    /* Full width items */
    gap: 0;
    padding: 10px 0;
  }

  #main-nav li {
    width: 100%;
    text-align: center;
  }

  #main-nav a {
    display: block;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
  }

  #main-nav a::after {
    display: none;
  }

  /* No underline on mobile */
  .btn-nav-cta {
    display: block;
    /* Full width button */
    margin: 10px 15px;
    text-align: center;
    border-radius: 5px;
  }

  .menu-toggle {
    display: block;
  }

  /* Show hamburger */
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-image {
    max-width: 300px;
    margin: 0 auto 30px auto;
  }

  .about-text ul {
    padding-left: 0;
  }

  .about-text li {
    justify-content: center;
    text-align: left;
  }

  /* Keep text left aligned */
  .contact-layout {
    grid-template-columns: 1fr;
    /* Stack form and info */
  }

  .contact-info-container {
    margin-top: 40px;
    text-align: center;
  }

  .contact-details p {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.7rem;
  }
  img {
    width: 94%;
  }

  section {
    padding: 50px 0;
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* Stack skills */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Stack services */
  .projects-items {
    grid-template-columns: 1fr;
  }

  /* Stack projects */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Stack testimonials */
}