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

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  background-color: #171717;
  color: #fff;
  line-height: 1.6;
  position: relative;
  font-family: "PT Serif", serif;
  font-weight: 400;
  font-style: normal;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Initial Loader */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #171717;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-content {
  text-align: center;
  width: 300px;
}

.logo-loader {
  margin-bottom: 30px;
}

.logo-border {
  width: 170px;
  height: 170px;
  border: 3px solid #007aff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  animation: pulse 2s infinite;
}

.logo-border span {
  font-size: 2rem;
  font-weight: 700;
  color: #007aff;
}

.loader-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.loader-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.loader-title {
  font-size: 1.2rem;
  color: #007aff;
  margin-bottom: 20px;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 6px;
  width: 0%;
  background-color: #007aff;
  border-radius: 5px;
  transition: width 0.3s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  color: #b3b3b3;
  font-size: 0.9rem;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(0, 122, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
  }
}

.main-content {
  display: none;
}

/* Navbar styling */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  width: 98%;
  height: 66px;
  top: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  margin: 20px;
  border-radius: 18px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-sy {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 122, 255, 0.1);
  width: 45px;
  height: 45px;
  border-radius: 8px;
  border: 1px solid rgba(0, 122, 255, 0.3);
  transition: all 0.3s ease;
  margin-right: 10px;
}

.logo-sy:hover {
  transform: rotate(-45deg);
  background: rgba(0, 122, 255, 0.2);
  border-color: #007aff;
}

.logo-sy-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: #007aff;
}

.full-name {
  font-size: 1.2rem;
  color: #ffffff;
}

/* Center the navigation links */
.nav-links {
  display: flex;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links li {
  margin: 0 1rem;
}
.nav-links li a.active {
  color: #007aff;
  font-weight: bold;
  border-bottom: 2px solid #007aff;
}

.nav-links a {
  color: #e5e5e5;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
  font-size: 1.1rem;
}

.nav-links a:hover {
  color: #007aff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #007aff;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Nav right section */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme toggle styles */
.theme {
  --bg-color: #111;
  --main-color: #fefefe;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-color);
  border-radius: 100%;
  border: 2px solid var(--main-color);
  box-shadow: 4px 4px var(--main-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.input {
  cursor: pointer;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 10;
  opacity: 0;
}

.icon {
  position: absolute;
  top: calc(50% - 13px);
  left: calc(50% - 13px);
  width: 26px;
  height: 26px;
  transition: all 0.3s ease;
}

.icon.icon-moon {
  fill: var(--main-color);
}

.icon.icon-sun {
  stroke: var(--main-color);
  display: none;
}

.input:checked ~ .icon.icon-sun {
  display: block;
}

.input:checked ~ .icon.icon-moon {
  display: none;
}

.theme:active {
  box-shadow: 0px 0px var(--main-color);
  transform: translate(3px, 3px);
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #007aff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Home content styling */
.home-content {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
  z-index: 2;
}

.name {
  font-size: 4rem;
  font-weight: 700;
  color: #ffffff;
  border-right: 4px solid #3498db; /* typing cursor */
  white-space: nowrap;
  overflow: hidden;
  width: 0ch;
  animation: typing 6s steps(15) infinite, blink 0.7s step-end infinite;
}

@keyframes typing {
  0% {
    width: 0ch;
  }
  40% {
    width: 15ch; /* fully typed */
  }
  60% {
    width: 15ch; /* pause while full text is visible */
  }
  100% {
    width: 0ch; /* back to start (deleting) */
  }
}

@keyframes blink {
  0%,
  49% {
    border-color: #3498db;
  }
  50%,
  100% {
    border-color: transparent;
  }
}

.card {
  margin: 1.5rem 0;
  display: inline-block;
  background: #1a1a1a;
  padding: 1rem 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader p {
  font-size: 1.5rem;
  font-weight: 400;
  color: #cccccc;
  margin: 0;
}

.words {
  position: relative;
  overflow: hidden;
  height: 40px;
  margin-left: 10px;
}

.word {
  display: block;
  height: 100%;
  padding-left: 6px;
  line-height: 40px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #007aff;
  animation: spin 12s infinite;
}

/* FIXED: Word animation timing */
@keyframes spin {
  0%,
  20% {
    transform: translateY(0%);
  }
  25%,
  45% {
    transform: translateY(-100%);
  }
  50%,
  70% {
    transform: translateY(-200%);
  }
  75%,
  95% {
    transform: translateY(-300%);
  }
  100% {
    transform: translateY(-400%);
  }
}

.description {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  color: #b3b3b3;
  line-height: 1.8;
  max-width: 600px;
}

/* Modern Button Styles */
.modern-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: white;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.1);
}

.modern-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.modern-btn:hover::before {
  left: 100%;
}

.modern-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
  background: linear-gradient(135deg, #0056b3, #003d82);
}

.modern-btn .btn-icon {
  transition: transform 0.3s ease;
}

.modern-btn:hover .btn-icon {
  transform: translateX(5px);
}

.view-work-btn {
  margin-bottom: 2rem;
}

/* Secondary button style */
.modern-btn.secondary {
  background: transparent;
  color: #007aff;
  border: 2px solid #007aff;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
}

.modern-btn.secondary:hover {
  background: #007aff;
  color: white;
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Social icons styling */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #b3b3b3;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon i {
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 122, 255, 0.5);
  transform: translateY(-3px);
}

.social-title {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 122, 255, 0.9);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.social-icon:hover .social-title {
  opacity: 1;
  visibility: visible;
  top: -40px;
}

/* Section styling */
.section {
  min-height: 100vh;
  padding: 7rem 5% 5rem;
  position: relative;
  z-index: 2;
  background-color: #1a1a1a;
}

.section h2 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 2rem;
  position: relative;
  text-align: center;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: #007aff;
}

.section p {
  color: #b3b3b3;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #007aff;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: #0056b3;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

/* FIXED: Animated lines background - BLUE color */
.lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Behind content */
  pointer-events: none;
}

.line {
  position: absolute;
  width: 1px;
  height: 100%;
  top: 0;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.line::after {
  content: "";
  display: block;
  position: absolute;
  height: 15vh;
  width: 100%;
  top: -50%;
  left: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 122, 255, 0) 0%,
    #007aff 75%,
    #007aff 100%
  );
  animation: drop 7s 0s infinite;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.4, 0.26, 0, 0.97);
}

/* Positioning 30 lines across the entire page using left property */
.line:nth-child(1) {
  left: 0%;
}
.line:nth-child(2) {
  left: 3.33%;
}
.line:nth-child(3) {
  left: 6.66%;
}
.line:nth-child(4) {
  left: 10%;
}
.line:nth-child(5) {
  left: 13.33%;
}
.line:nth-child(6) {
  left: 16.66%;
}
.line:nth-child(7) {
  left: 20%;
}
.line:nth-child(8) {
  left: 23.33%;
}
.line:nth-child(9) {
  left: 26.66%;
}
.line:nth-child(10) {
  left: 30%;
}
.line:nth-child(11) {
  left: 33.33%;
}
.line:nth-child(12) {
  left: 36.66%;
}
.line:nth-child(13) {
  left: 40%;
}
.line:nth-child(14) {
  left: 43.33%;
}
.line:nth-child(15) {
  left: 46.66%;
}
.line:nth-child(16) {
  left: 50%;
}
.line:nth-child(17) {
  left: 53.33%;
}
.line:nth-child(18) {
  left: 56.66%;
}
.line:nth-child(19) {
  left: 60%;
}
.line:nth-child(20) {
  left: 63.33%;
}
.line:nth-child(21) {
  left: 66.66%;
}
.line:nth-child(22) {
  left: 70%;
}
.line:nth-child(23) {
  left: 73.33%;
}
.line:nth-child(24) {
  left: 76.66%;
}
.line:nth-child(25) {
  left: 80%;
}
.line:nth-child(26) {
  left: 83.33%;
}
.line:nth-child(27) {
  left: 86.66%;
}
.line:nth-child(28) {
  left: 90%;
}
.line:nth-child(29) {
  left: 93.33%;
}
.line:nth-child(30) {
  left: 96.66%;
}

/* Different animation delays for each line */
.line:nth-child(1)::after {
  animation-delay: 2s;
}
.line:nth-child(2)::after {
  animation-delay: 1s;
}
.line:nth-child(3)::after {
  animation-delay: 5s;
}
.line:nth-child(4)::after {
  animation-delay: 3s;
}
.line:nth-child(5)::after {
  animation-delay: 4s;
}
.line:nth-child(6)::after {
  animation-delay: 2.5s;
}
.line:nth-child(7)::after {
  animation-delay: 1.5s;
}
.line:nth-child(8)::after {
  animation-delay: 4.5s;
}
.line:nth-child(9)::after {
  animation-delay: 0.5s;
}
.line:nth-child(10)::after {
  animation-delay: 3.5s;
}
.line:nth-child(11)::after {
  animation-delay: 2.2s;
}
.line:nth-child(12)::after {
  animation-delay: 1.2s;
}
.line:nth-child(13)::after {
  animation-delay: 4.2s;
}
.line:nth-child(14)::after {
  animation-delay: 0.8s;
}
.line:nth-child(15)::after {
  animation-delay: 3.2s;
}
.line:nth-child(16)::after {
  animation-delay: 2.7s;
}
.line:nth-child(17)::after {
  animation-delay: 1.7s;
}
.line:nth-child(18)::after {
  animation-delay: 4.7s;
}
.line:nth-child(19)::after {
  animation-delay: 0.3s;
}
.line:nth-child(20)::after {
  animation-delay: 3.7s;
}
.line:nth-child(21)::after {
  animation-delay: 2.9s;
}
.line:nth-child(22)::after {
  animation-delay: 1.9s;
}
.line:nth-child(23)::after {
  animation-delay: 4.9s;
}
.line:nth-child(24)::after {
  animation-delay: 0.7s;
}
.line:nth-child(25)::after {
  animation-delay: 3.9s;
}
.line:nth-child(26)::after {
  animation-delay: 2.1s;
}
.line:nth-child(27)::after {
  animation-delay: 1.1s;
}
.line:nth-child(28)::after {
  animation-delay: 4.1s;
}
.line:nth-child(29)::after {
  animation-delay: 0.9s;
}
.line:nth-child(30)::after {
  animation-delay: 3.1s;
}

/* FIXED: Ensure lines move properly with BLUE color */
@keyframes drop {
  0% {
    top: -50%;
  }
  100% {
    top: 110%;
  }
}

/* Hide animation on other sections */
body:not(.home-page) .lines .line::after {
  animation: none;
  opacity: 0.1;
}

/* About Section */
#about {
  background-color: #1a1a1a;
  padding: 7rem 5% 5rem;
  position: relative;
  z-index: 2;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* About Header */
.about-header {
  text-align: center;
  margin-bottom: 4rem;
}

.about-title {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.about-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: #007aff;
}

.about-subtitle {
  font-size: 1.2rem;
  color: #b3b3b3;
  margin-bottom: 3rem;
}

/* Stats Container */
.stats-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  text-align: center;
  min-width: 150px;
  transition: all 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 122, 255, 0.3);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #007aff;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: #b3b3b3;
}

/* About Content */
.about-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4rem;
  margin-bottom: 5rem;
}

.bio-text {
  flex: 1;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.bio-text:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 122, 255, 0.3);
}

.bio-text p {
  color: #b3b3b3;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.about-image {
  flex: 0 0 300px;
}

.avatar {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.avatar:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 122, 255, 0.2);
}

/* Skills and Approach Container */
.skills-approach-container {
  display: flex;
  gap: 4rem;
}

.skills-container,
.approach-container {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-heading {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 2rem;
  position: relative;
}

.section-heading::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: #007aff;
}

/* Skill Items */
.skill-item {
  margin-bottom: 1.5rem;
  padding: 10px;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-name span:first-child {
  color: #ffffff;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-name i {
  color: #007aff;
  font-size: 1.2rem;
  width: 24px;
}

.skill-percentage {
  color: #007aff;
  font-weight: 600;
}

.skill-bar {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background-color: #007aff;
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

/* Approach Items */
.approach-item {
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-left: 3px solid #007aff;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.approach-item:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.approach-icon-title {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}

.approach-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.approach-icon i {
  color: #007aff;
  font-size: 1.2rem;
}

.approach-title {
  color: #ffffff;
  font-size: 1.2rem;
  margin: 0;
}

.approach-desc {
  color: #b3b3b3;
  line-height: 1.6;
  padding-left: 60px;
}

/* Progress bar animation when in viewport */
.skill-progress.animate {
  width: var(--progress-width);
}

/* Soft Skills Section - Compact Version */
.soft-skills-container {
  margin-top: 4rem;
  padding: 1.5rem 0;
}

.soft-skills-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.soft-skill-card {
  height: 150px;
  width: 150px;
  perspective: 1000px;
  cursor: pointer;
  flex-shrink: 0;
}

.soft-skill-front,
.soft-skill-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
  transition: transform 0.5s;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.05);
}

.soft-skill-front {
  transform: rotateY(0deg);
}

.soft-skill-back {
  transform: rotateY(180deg);
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.2);
  overflow: hidden;
}

.soft-skill-card:hover .soft-skill-front {
  transform: rotateY(-180deg);
}

.soft-skill-card:hover .soft-skill-back {
  transform: rotateY(0deg);
}

.soft-skill-front i {
  font-size: 1.5rem;
  color: #007aff;
  margin-bottom: 0.5rem;
}

.soft-skill-front h3 {
  color: #ffffff;
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.2;
  margin: 0;
}

.soft-skill-back p {
  color: #b3b3b3;
  text-align: center;
  line-height: 1.3;
  font-size: 0.9rem;
  margin: 0;
}

/* Resume Section */
#resume {
  background-color: #1a1a1a;
  padding: 7rem 5% 5rem;
  position: relative;
  z-index: 2;
}

.resume-container {
  max-width: 1200px;
  margin: 0 auto;
}

.resume-header {
  text-align: center;
  margin-bottom: 4rem;
}

.resume-title {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.resume-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: #007aff;
}

.resume-subtitle {
  font-size: 1.2rem;
  color: #b3b3b3;
  margin-bottom: 3rem;
  text-align: center;
  display: block;
}

.resume-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.view-cv-btn {
  background-color: #007aff;
  color: white;
  border: 1px solid #007aff;
}

.view-cv-btn:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 122, 255, 0.3);
}

.download-cv-btn {
  background-color: transparent;
  color: #ffffffbb;
  border: 1px solid #007aff;
}

.download-cv-btn:hover {
  background-color: rgba(0, 122, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 122, 255, 0.2);
}

.resume-section {
  margin-bottom: 4rem;
}

.resume-section-title {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  padding-bottom: 10px;
  justify-content: center;
}

.resume-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: #007aff;
}
/* Light Theme */
body.light-theme .resume-section-title {
  color: #000000; /* أسود في الثيم الفاتح */
}

.resume-section-title i {
  color: #007aff;
  font-size: 1.8rem;
}

/* Education Card - Centered */
.education-card-centered {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.education-card-centered:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 122, 255, 0.3);
}

.education-header {
  margin-bottom: 1rem;
}

.education-title {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.education-period {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
}

.education-institution {
  font-size: 1.2rem;
  color: #b3b3b3;
  margin: 1rem 0;
  font-weight: 500;
}

.education-location {
  color: #888;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.education-details p {
  color: #b3b3b3;
  line-height: 1.6;
  margin: 0;
}
/* Timeline Vertical with merged nodes */
.cert-timeline {
  list-style: none;
  margin: 0 auto;
  padding: 2em 0;
  max-width: 800px;
  position: relative;
}

/* الخط العمودي المستمر */
.cert-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2em;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #007aff, #00c6ff);
  border-radius: 2px;
  z-index: 0;
}

/* كل خطوة */
.cert-step {
  position: relative;
  margin-bottom: 3em;
  padding-left: 4em;
}

/* النود فوق الخط */
.cert-node {
  position: absolute;
  top: 50%;
  left: 2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007aff, #00c6ff);
  border: 3px solid #1a1a1a;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* نقطة داخل النود */
.cert-node::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00c6ff;
}

/* البطاقة */
.cert-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-left: 1.5em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease,
    color 0.3s ease;
  z-index: 2;
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.6);
}

/* نصوص البطاقة */
.cert-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.cert-meta {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.35rem 0 0.75rem;
  color: #00c6ff;
}

.cert-desc {
  font-size: 0.95rem;
  color: #cccccc;
  line-height: 1.7;
  margin: 0;
}

/* --- Light Theme --- */
body.light-theme .cert-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme .cert-title {
  color: #111111;
}

body.light-theme .cert-meta {
  color: #007aff;
}

body.light-theme .cert-desc {
  color: #333333;
}

body.light-theme .cert-node {
  border: 3px solid #ffffff;
  background: linear-gradient(135deg, #007aff, #00c6ff);
}

body.light-theme .cert-node::before {
  background: #007aff;
}

/* Services Section */
#services {
  background-color: #171717;
  padding: 7rem 5% 5rem;
  position: relative;
  z-index: 2;
}

.services-container {
  max-width: 1400px;
  margin: 0 auto;
}

.services-header {
  text-align: center;
  margin-bottom: 4rem;
}

.services-title {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.services-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: #007aff;
}

.services-subtitle {
  font-size: 1.2rem;
  color: #b3b3b3;
  margin-bottom: 2rem;
}

/* Services Grid - 4 cards in one line */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #007aff, transparent);
  transition: left 0.5s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 122, 255, 0.2);
  border-color: rgba(0, 122, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: rgba(0, 122, 255, 0.2);
  transform: scale(1.1);
}

.service-icon i {
  font-size: 2rem;
  color: #007aff;
}

.service-title {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-description {
  color: #b3b3b3;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.service-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.service-features li {
  color: #b3b3b3;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.service-features i {
  color: #007aff;
  font-size: 0.8rem;
}

.service-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0.8rem 1.5rem;
}

/* Projects Section */
#projects {
  background-color: #1a1a1a;
  padding: 7rem 5% 5rem;
  position: relative;
  z-index: 2;
}

.projects-container {
  max-width: 1400px;
  margin: 0 auto;
}

.projects-header {
  text-align: center;
  margin-bottom: 4rem;
}

.projects-title {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.projects-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: #007aff;
}

.projects-subtitle {
  font-size: 1.2rem;
  color: #b3b3b3;
  margin-bottom: 2rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.project-card.hidden {
  display: none;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 122, 255, 0.3);
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 2rem;
}

.project-title {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 600;
}

.project-description {
  color: #b3b3b3;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(0, 122, 255, 0.3);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

body.light-theme .project-link {
  color: #333; /* أسود فاتح للروابط */
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Projects Toggle */
.projects-toggle {
  text-align: center;
}

.show-more-btn {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  background: transparent;
  color: #007aff;
  border: 2px solid #007aff;
}

.show-more-btn:hover {
  background: #007aff;
  color: white;
}

/* Contact Section */
#contact {
  background-color: #171717;
  padding: 7rem 5% 5rem;
  position: relative;
  z-index: 2;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact-title {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.contact-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: #007aff;
}

.contact-subtitle {
  font-size: 1.2rem;
  color: #b3b3b3;
  margin-bottom: 2rem;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  space-y: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(10px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.2rem;
  color: #007aff;
}

.contact-details h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-details a {
  color: #b3b3b3;
  margin: 0;
  text-decoration: underline;
}
.contact-details a:hover {
  color: #007aff;
}

/* Contact CTA */
.contact-cta {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

.cta-content h3 {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cta-content p {
  color: #b3b3b3;
  line-height: 1.6;
  margin-bottom: 2rem;
}

body.light-theme .contact-cta {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 15px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

body.light-theme .cta-content h3 {
  color: #333333;
}

body.light-theme .cta-content p {
  color: #555555;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-btn {
  flex: 1;
  min-width: 150px;
  justify-content: center;
}

/* Footer */
.footer {
  background-color: #0f0f0f;
  padding: 4rem 5% 2rem;
  color: #b3b3b3;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  color: #ffffff;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  position: relative;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: #007aff;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: rgba(0, 122, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 122, 255, 0.3);
  transition: all 0.3s ease;
  margin-right: 10px;
}

.footer-logo-link:hover {
  transform: rotate(45deg);
  background: rgba(0, 122, 255, 0.2);
  border-color: #007aff;
}

.footer-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #007aff;
}

.footer-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-social-icons {
  display: flex;
  gap: 1rem;
}

.footer-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b3b3b3;
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-social-icons a:hover {
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #b3b3b3;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #007aff;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-contact-icon {
  margin-right: 10px;
  color: #007aff;
  width: 20px;
}

.footer-contact-text {
  flex: 1;
}

/* Footer contact links */
.footer-contact-text a {
  color: #b3b3b3;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.footer-contact-text a:hover {
  color: #007aff;
}

.whatsapp-link {
  margin-left: 10px;
  display: inline-block;
}

.whatsapp-link a {
  color: #25d366;
  transition: all 0.3s ease;
  display: inline-block;
}

.whatsapp-link a:hover {
  color: #128c7e;
  transform: scale(1.2);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Light theme styles */
body.light-theme {
  background-color: #f5f5f7;
  color: #333;
}

body.light-theme .navbar {
  background: rgba(245, 245, 247, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .logo-sy {
  background: rgba(0, 122, 255, 0.1);
  border: 1px solid rgba(0, 122, 255, 0.3);
}

body.light-theme .full-name {
  color: #333;
}

body.light-theme .nav-links a {
  color: #555;
}

body.light-theme .nav-links a:hover {
  color: #007aff;
}

body.light-theme .theme {
  --bg-color: #fefefe;
  --main-color: #111;
}

body.light-theme .hamburger span {
  background-color: #007aff;
}

body.light-theme .name {
  color: #333;
}

body.light-theme .card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .loader p {
  color: #666;
}

body.light-theme .word {
  color: #007aff;
}

body.light-theme .description {
  color: #666;
}

body.light-theme .social-icon {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #666;
}

body.light-theme .social-icon:hover {
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
}

body.light-theme .social-title {
  color: rgba(0, 0, 0, 0.521);
}

body.light-theme .section {
  background-color: #ffffff;
}

body.light-theme .section h2 {
  color: #333;
}

body.light-theme .section p {
  color: #666;
}

body.light-theme .lines .line {
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .lines .line::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 122, 255, 0) 0%,
    #007aff 75%,
    #007aff 100%
  );
}

/* Light theme fixes for Resume, Services, Projects, Contact */
body.light-theme #resume,
body.light-theme #services,
body.light-theme #projects,
body.light-theme #contact {
  background-color: #f5f5f7;
}

body.light-theme .resume-title,
body.light-theme .services-title,
body.light-theme .projects-title,
body.light-theme .contact-title {
  color: #333;
}

body.light-theme .resume-subtitle,
body.light-theme .services-subtitle,
body.light-theme .projects-subtitle,
body.light-theme .contact-subtitle {
  color: #666;
}

body.light-theme .education-card-centered,
body.light-theme .certification-item,
body.light-theme .service-card,
body.light-theme .project-card,
body.light-theme .contact-item {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .education-card-centered:hover,
body.light-theme .certification-item:hover,
body.light-theme .service-card:hover,
body.light-theme .project-card:hover {
  border-color: rgba(0, 122, 255, 0.3);
}

body.light-theme .education-title,
body.light-theme .certification-title,
body.light-theme .service-title,
body.light-theme .project-title {
  color: #333;
}

body.light-theme .education-details p,
body.light-theme .certification-description,
body.light-theme .service-description,
body.light-theme .project-description {
  color: #666;
}

body.light-theme .contact-details h3 {
  color: #333;
}

body.light-theme .contact-details a,
p {
  color: #333;
}

body.light-theme #about {
  background-color: #ffffff;
}

body.light-theme .about-title {
  color: #333;
}

body.light-theme .about-subtitle {
  color: #666;
}

body.light-theme .stat-box {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .stat-label {
  color: #666;
}

body.light-theme .bio-text p {
  color: #666;
}

body.light-theme .avatar {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-theme .skills-container,
body.light-theme .approach-container {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .section-heading {
  color: #333;
}

body.light-theme .skill-name span:first-child {
  color: #333;
}

body.light-theme .skill-bar {
  background-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .approach-title {
  color: #333;
}

body.light-theme .approach-desc {
  color: #666;
}

body.light-theme .soft-skill-front,
body.light-theme .soft-skill-back {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .soft-skill-back {
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.2);
}

body.light-theme .soft-skill-front h3 {
  color: #333;
}

body.light-theme .soft-skill-back p {
  color: #666;
}

body.light-theme .footer {
  background-color: #e5e5e7;
  color: #555;
}

body.light-theme .footer-column h3 {
  color: #333;
}

body.light-theme .footer-logo-link {
  background: rgba(0, 122, 255, 0.1);
  border: 1px solid rgba(0, 122, 255, 0.3);
}

body.light-theme .footer-description {
  color: #666;
}

body.light-theme .footer-social-icons a {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #666;
}

body.light-theme .footer-social-icons a:hover {
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
}

body.light-theme .footer-links a {
  color: #666;
}

body.light-theme .footer-links a:hover {
  color: #007aff;
}

body.light-theme .footer-contact-text a {
  color: #666;
}

body.light-theme .footer-contact-text a:hover {
  color: #007aff;
}

body.light-theme .footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive design */
@media (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    flex-direction: column;
    background: rgba(23, 23, 23, 0.98);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    padding: 2rem;
    transform: none;
    left: auto;
  }

  .nav-links.active {
    right: 0;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
  }

  .nav-links li {
    margin: 1.5rem 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .hamburger {
    display: flex;
  }

  /* Light theme mobile menu */
  body.light-theme .nav-links {
    background: rgba(245, 245, 247, 0.98);
  }

  .about-content {
    flex-direction: column;
    gap: 2rem;
  }

  .about-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .skills-approach-container {
    flex-direction: column;
    gap: 3rem;
  }

  .approach-desc {
    padding-left: 0;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  /* Certifications: stack on tablets */
  .certifications-scroll {
    padding: 1rem 0;
  }
  .certification-item {
    width: 100%;
    margin: 1rem 0 !important;
    padding: 1rem 1.25rem;
  }
  .certifications-scroll .certification-item::after {
    display: none;
  }
}
/* للأجهزة المتوسطة والجوال */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .sidebar {
    width: 100%;
    position: relative;
  }

  .main-content {
    width: 100%;
    padding: 10px;
  }

  .chat-container {
    height: 60vh; /* ضبط ارتفاع صندوق الدردشة */
  }

  button {
    font-size: 1rem;
    padding: 0.7rem 1rem;
  }

  .modal {
    width: 90%;
  }

  .navbar {
    padding: 1rem 3%; /* تصغير الحواف لتناسب الجوال */
    width: 94%; /* عرض أقل لتجنب الخروج خارج الشاشة */
    box-sizing: border-box;
  }

  .stats-container {
    flex-direction: column;
    align-items: center;
  }

  .stat-box {
    width: 100%;
    max-width: 250px;
  }

  .about-title {
    font-size: 2.5rem;
  }

  .section-heading {
    font-size: 1.8rem;
  }

  .skills-container,
  .approach-container {
    padding: 1.5rem;
  }

  .name {
    font-size: 2.5rem;
  }

  .card {
    padding: 0.8rem 1.5rem;
  }

  .loader p {
    font-size: 1.2rem;
  }

  .word {
    font-size: 0.9rem;
    line-height: 35px;
  }

  .description {
    font-size: 1rem;
  }

  .home-content {
    padding-top: 5rem;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .certification-item {
    margin: 0.75rem 0 !important;
  }

  .soft-skills-grid {
    grid-template-columns: repeat(5, 100px);
    gap: 0.8rem;
  }

  .soft-skill-card {
    height: 100px;
    width: 100px;
  }

  .soft-skill-front i {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
  }

  .soft-skill-front h3 {
    font-size: 0.75rem;
  }

  .soft-skill-back p {
    font-size: 0.65rem;
  }

  .project-links {
    flex-direction: column;
  }
}

/* الأجهزة الأصغر */
@media (max-width: 576px) {
  .about-header {
    margin-bottom: 3rem;
  }

  .about-title {
    font-size: 2rem;
  }

  .about-subtitle {
    font-size: 1rem;
  }

  .bio-text p {
    font-size: 1rem;
  }

  .approach-icon-title {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .approach-icon {
    margin-right: 0;
  }

  .stat-number {
    font-size: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 3rem 5% 1.5rem;
  }

  .footer-logo {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-logo-link {
    margin-bottom: 10px;
    margin-right: 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .certification-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .certifications-scroll {
    grid-template-columns: 1fr;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
  }

  .contact-details h3 {
    margin-top: 0.5rem;
  }

  /* Navbar أصغر */
  .navbar {
    padding: 1rem 2%;
    width: 96%;
  }
}

/* أجهزة الجوال الصغيرة جدًا */
@media (max-width: 480px) {
  .soft-skills-grid {
    grid-template-columns: repeat(4, 90px);
    gap: 0.5rem;
  }

  .soft-skill-card {
    height: 90px;
    width: 90px;
  }

  .soft-skill-front i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .soft-skill-front h3 {
    font-size: 0.7rem;
  }

  .soft-skill-back p {
    font-size: 0.6rem;
    line-height: 1.2;
  }

  /* Navbar كامل الشاشة مع حواف صغيرة */
  .navbar {
    padding: 0.8rem 3%;
    width: 94%;
  }
}

/* Horizontal scroll for very small screens */
@media (max-width: 1024px) {
  .soft-skills-grid {
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #007aff rgba(255, 255, 255, 0.1);
  }

  .soft-skills-grid::-webkit-scrollbar {
    height: 6px;
  }

  .soft-skills-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }

  .soft-skills-grid::-webkit-scrollbar-thumb {
    background: #007aff;
    border-radius: 3px;
  }

  /* Light theme scrollbar */
  body.light-theme .soft-skills-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
  }

  .certifications-container::-webkit-scrollbar {
    width: 6px;
  }

  .certifications-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }

  .certifications-container::-webkit-scrollbar-thumb {
    background: #007aff;
    border-radius: 3px;
  }
}

/* Fix for landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .home-content {
    padding-top: 8rem;
  }

  .name {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .card {
    margin: 0.8rem 0;
    padding: 0.5rem 1rem;
  }

  .loader p {
    font-size: 1rem;
  }

  .words {
    height: 30px;
  }

  .word {
    line-height: 30px;
    font-size: 0.9rem;
  }

  .description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .view-work-btn {
    padding: 0.7rem 1.5rem;
    margin-bottom: 1.5rem;
  }

  .social-icons {
    margin-top: 0.5rem;
  }
}
