/* GENERAL */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

:root {
  --bg-color: #fff;
  --text-color: rgb(85, 85, 85);
  --text-color-dark: black;
  --primary-container-bg: rgb(250, 250, 250);
  --secondary-container-bg: white;
  --border-color: rgb(163, 163, 163);
  --border-color-dark: rgb(53, 53, 53);
  --btn-hover-bg: rgb(53, 53, 53);
  --btn-hover-text: white;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #f0f0f0;
  --text-color-dark: #f0f0f0;
  --primary-container-bg: #1e1e1e;
  --secondary-container-bg: #2a2a2a;
  --border-color: #555;
  --border-color-dark: #f0f0f0;
  --btn-hover-bg: #f0f0f0;
  --btn-hover-text: #121212;
  --shadow-color: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 300ms ease, color 300ms ease;
}

html {
  scroll-behavior: smooth;
}

p {
  color: var(--text-color);
}

/* TRANSITION */
a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */
nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 14vh;
  background-color: var(--bg-color);
  border-bottom: 0px solid var(--border-color);
}

.nav-links {
  gap: 5rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: var(--text-color-dark);
  text-decoration: none;
  text-decoration-color: var(--bg-color);
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--border-color);
}

.logo {
  font-size: 2rem;
  color: var(--text-color-dark);
  font-weight: 600;
}

.logo:hover {
  cursor: default;
}

/* --- NEW: TOGGLES IN NAV --- */
.nav-toggles {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.toggle-btn {
  background: none;
  border: 2px solid var(--border-color-dark);
  color: var(--text-color-dark);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 300ms ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-btn:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  z-index: 2;
}

.sun-icon,
.moon-icon {
  font-size: 22px;
  z-index: 1;
}

.sun-icon {
  color: #ffa500;
}

.moon-icon {
  color: #340eca;
}

input:checked+.slider {
  background-color: var(--btn-hover-bg);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

/* HAMBURGER MENU */
#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color-dark);
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--secondary-container-bg);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  border-radius: 0rem;
  box-shadow: 0 8px 16px var(--shadow-color);
  border: 0px solid var(--border-color);
}

.menu-links a {
  display: block;
  padding: 15px 25px;
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-color-dark);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links a:hover {
  background-color: var(--primary-container-bg);
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 500px;
  padding: 1rem 0;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.mobile-toggles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 15px;
  border-top: 1px solid var(--border-color);
  margin-top: 10px;
}

/* RTL SUPPORT - Keep LTR layout but allow Arabic text */
html[dir="rtl"] {
  /* Keep the same layout direction, only change text alignment where needed */
  direction: ltr;
}

html[dir="rtl"] body {
  text-align: left;
}

/* SECTIONS */
section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */
#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
}

.section__pic-container img {
  border-radius: 50%;
  /* Changed from 2rem to 50% */
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 8px 16px var(--shadow-color);
  /* Corrected box-shadow syntax */
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-color-dark);
}

.title {
  font-size: 3rem;
  text-align: center;
  color: var(--text-color-dark);
  margin-bottom: 1rem;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */
.icon {
  cursor: pointer;
  height: 0.9rem;
  color: rgb(44, 143, 242);
  transition: all 300ms ease;
}

.icon:hover {
  transform: scale(1.1);
}

/* BUTTONS */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
}

.btn-color-1,
.btn-color-2 {
  border: var(--border-color-dark) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.btn-color-1,
.btn-color-2:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
}

.btn-color-1:hover {
  background: var(--text-color-dark);
  color: var(--bg-color);
}

.btn-color-2 {
  background: none;
  color: var(--text-color-dark);
}

.btn-color-2:hover {
  border: var(--btn-hover-bg) 0.1rem solid;
}

/* ABOUT SECTION */
#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.about-pic {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 8px 16px var(--shadow-color);
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: var(--secondary-container-bg);
  border-radius: 2rem;
  border: var(--border-color) 0.1rem solid;
  text-align: center;
  transition: all 300ms ease;
  box-shadow: 0 4px 8px var(--shadow-color);
}

.details-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--shadow-color);
}

.section-container {
  gap: 4rem;
  height: 80%;
}

.section-container {
  display: flex;
  /* Ensure it's a flex container */
  justify-content: center;
  /* Center items horizontally */
  align-items: center;
  /* Center items vertically */
  gap: 4rem;
  height: 80%;
  /* Add max-width to prevent it from stretching too wide on very large screens */
  max-width: 1200px;
  margin: 0 auto;
  /* Center the container itself */
  flex-wrap: wrap;
  /* Allow items to wrap on smaller desktop screens */
}

/* EXPERIENCE SECTION */
#experience {
  position: relative;
}

.experience-sub-title {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

/* PROJECTS SECTION */
#projects {
  position: relative;
}

.color-container {
  border-color: var(--border-color);
  background: var(--primary-container-bg);
}

.project-img {
  border-radius: 2rem;
  width: 90%;
  height: 90%;
  object-fit: cover;
  box-shadow: 0 8px 16px var(--shadow-color);
}

.project-title {
  margin: 1rem;
  color: var(--text-color-dark);
}

.project-btn {
  color: var(--text-color-dark);
  border-color: var(--border-color);
}


/* CONTACT */
#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: var(--border-color) 0.1rem solid;
  background: var(--primary-container-bg);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 0.9rem;
}

/* FOOTER SECTION */
footer {
  height: 11vh;
  margin: 0 1rem;
  border-top: 1px solid var(--border-color);
}

footer nav {
  height: auto;
  border-bottom: none;
}

footer p {
  text-align: center;
}