@import url("https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@400;700&display=swap");

:root {
  --background-color: #111827;
  --nav-color: #060a13;
  --text-color: #e0e0e0;
  --link-color: #b0b0b0;
  --link-hover-color: #ffcc00; /* اللون الأصفر للمؤشر */
  --highlight-color: #ffffff;
  --button-color: #ffcc00; /* اللون الأصفر الأساسي للأزرار */
  --button-hover-color: #e6b800;
  --background-secondary-color: #020617;
  --image-size: 427px;
  --border-radius: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Lexend Deca", sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
}

a {
  text-decoration: none;
  color: var(--link-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--link-hover-color);
}

img {
  width: var(--image-size);
  height: var(--image-size);
  border-radius: var(--border-radius);
}

nav {
  background-color: var(--nav-color);
  display: flex;
  padding: 20px 100px;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  gap: 30px;
}

nav ul li {
  list-style: none;
}

.highlight-link {
  color: var(--highlight-color);
}

.profile-image img {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-btn {
  background-color: var(--button-color);
  color: var(--background-color);
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 25px;
  transition: background-color 0.3s ease;
}

.contact-btn:hover {
  background-color: var(--button-hover-color);
}

h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--highlight-color);
}

h2 {
  color: var(--highlight-color);
  font-weight: 700;
  font-size: 24px;
}

h3 {
  font-size: 26px;
  font-weight: 400;
  padding-bottom: 4px;
  color: var(--link-hover-color);
}

h4 {
  font-size: 16px;
  font-weight: 400;
  color: var(--link-color);
  margin-bottom: 10px;
}

h5 {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-color);
  margin-bottom: 20px;
}

p {
  max-width: 470px;
  color: var(--link-color);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 25px;
}

strong {
  color: var(--link-hover-color);
}

section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px 100px;
}

.about-content {
  position: relative;
  right: 120px;
}

.about_me {
  font-size: 42px;
  font-weight: 700;
  padding: 80px 0 20px 0;
  text-align: center;
}

.about-section {
  padding: 60px 100px;
  background-color: var(--background-secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 90px;
}

.about-image {
  position: relative;
  display: inline-block;
}

.about-image::before {
  content: "";
  position: absolute;
  top: 1.5vw;
  left: 7.5vw;
  width: 100%;
  height: 100%;
  border: 0.8vw solid var(--button-color);
  border-radius: var(--border-radius);
  z-index: 0;
}

.about-image img {
  border-radius: var(--border-radius);
  width: var(--image-size);
  height: auto;
  position: relative;
  left: 155px;
  z-index: 1;
  display: block;
  border: none;
  box-shadow: none;
}

.services-section,
.experiences-section,
.contact-section {
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
}

.services-header,
.experiences-header,
.contact-header {
  text-align: center;
  margin-bottom: 50px;
  width: 100%;
  max-width: 1200px;
}

.services-header h2,
.experiences-header h2,
.contact-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--highlight-color);
  margin-bottom: 24px;
}

.services-header p,
.experiences-header p,
.contact-header p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--link-color);
  max-width: 670px;
  margin: 0px 0px 0px 250px;
}

.services-container,
.experiences-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1200px;
}

.service-card,
.experience-card {
  background-color: var(--background-secondary-color);
  border-radius: var(--border-radius);
  text-align: center;
  padding: 32px;
  transition: transform 0.3s ease-in-out;
}

.service-card:hover,
.experience-card:hover {
  transform: translateY(-10px);
}

.service-icon {
  font-size: 40px;
  color: var(--button-color);
  margin-bottom: 15px;
}

.service-card h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--highlight-color);
  margin: 16px 0;
  padding-bottom: 0;
}

.service-card p {
  font-size: 16px;
  color: var(--link-color);
  line-height: 1.6;
}

.portfolio-section {
  background-color: var(--background-secondary-color);
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfolio-header {
  text-align: center;
  margin-bottom: 50px;
}

.portfolio-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--highlight-color);
  margin-bottom: 30px;
}

.portfolio-header p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--link-color);
}

.portfolio-container {
  display: grid;
  grid-template-columns: 540px 256px 256px;
  grid-template-rows: 268px 268px;
  gap: 27px;
  grid-template-areas:
    "large small1 small2"
    "large small3 small4";
  width: auto;
  max-width: fit-content;
  margin: 0 auto;
}

.portfolio-item:nth-child(1) {
  grid-area: large;
  width: 540px;
  height: 565px;
}

.portfolio-item {
  overflow: hidden;
  border-radius: 15px;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 15px;
  transition: transform 0.3s ease-in-out;
  object-fit: cover;
}

/* Contact Section */
.contact-section {
  background-color: var(--background-secondary-color);
  padding: 80px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-content {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  gap: 50px;
}

.contact-info {
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-info p {
  margin-bottom: 20px;
  max-width: 100%;
  line-height: 1.5;
}

.contact-form {
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
}

.contact-form input,
.contact-form textarea {
  background-color: var(--background-color);
  border: none;
  color: var(--text-color);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 16px;
}

.contact-form textarea {
  height: 200px;
  resize: none;
}

.contact-form .contact-btn {
  width: fit-content;
  margin-top: 0;
}

/* Footer Section */
.footer-section {
  background-color: var(--background-secondary-color);
  padding: 80px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-section h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.footer-section p {
  max-width: 600px;
  margin: 0 auto 30px;
}

.social-icons a {
  color: var(--text-color);
  font-size: 24px;
  margin: 0 10px;
  transition: color 0.3s ease;
}

/* Specific styling for LinkedIn icon */
.social-icons a.fa-linkedin-in {
  color: var(--button-color); /* اللون الأصفر المحدد للينكد إن */
}

.social-icons a:hover {
  color: var(--button-color);
}


/* --- Media Queries for Responsiveness --- */

/* For Tablets (768px to 1024px) */
@media (max-width: 1024px) {
  nav {
    padding: 20px 50px;
  }

  section {
    padding: 60px 50px;
  }

  .about-content {
    right: 0;
    text-align: center;
  }

  .about-image {
    left: 0;
  }

  .about-image img {
    left: 0;
    max-width: 350px;
  }

  .about-image::before {
    display: none;
  }

  .services-header,
  .experiences-header,
  .contact-header {
    text-align: center;
  }

  .services-container,
  .experiences-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .service-card,
  .experience-card {
    padding: 25px;
    width: auto;
  }

  .portfolio-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "large large"
      "small1 small2"
      "small3 small4";
    gap: 15px;
    max-width: 700px;
  }

  .portfolio-item:nth-child(1) {
    width: 100%;
    height: 100%;
  }

  .portfolio-item {
    width: auto;
    height: auto;
  }

  .contact-content {
    flex-direction: column;
    gap: 30px;
  }

  .contact-info,
  .contact-form {
    max-width: 100%;
  }

  .footer-section {
    padding: 60px 20px;
  }
}

/* For Mobile Devices (max 767px) */
@media (max-width: 767px) {
  nav {
    flex-direction: column;
    padding: 20px;
  }

  nav ul {
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  section {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
  }

  .hero-section {
    flex-direction: column-reverse;
  }

  .about-section {
    flex-direction: column;
  }

  .about-image {
    margin-bottom: 20px;
  }

  .about-content {
    right: 0;
  }

  .services-container,
  .experiences-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .portfolio-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "large"
      "small1"
      "small2"
      "small3"
      "small4";
  }

  .portfolio-item {
    width: 100%;
    height: auto;
  }

  .contact-section {
    padding: 40px 20px;
  }

  .contact-info,
  .contact-form {
    text-align: left;
  }
}