:root {
  --primary: #0a192f;
  --secondary: #172a45;
  --accent: #64ffda;
  --text-primary: #ccd6f6;
  --text-secondary: #8892b0;
  --light-bg: #f8f9fa;
  --light-text: #343a40;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--primary);
  color: var(--text-primary);
  transition: background 0.4s, color 0.4s;
  line-height: 1.6;
  overflow-x: hidden;
}

body.light-mode {
  background: var(--light-bg);
  color: var(--light-text);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  background: rgba(10, 25, 47, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}

body.light-mode .navbar {
  background: rgba(248, 249, 250, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  padding: 1rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links li a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s;
  position: relative;
}

body.light-mode .nav-links li a {
  color: var(--light-text);
}

.nav-links li a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links li a:hover::before,
.nav-links li a.active::before {
  width: 100%;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-left: 2rem;
  margin-right: 2rem;
}

body.light-mode .theme-toggle {
  color: var(--light-text);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

body.light-mode .hero-section {
  background: linear-gradient(to bottom, var(--light-bg), #e9ecef);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
}

.hero-text {
  flex: 1;
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-text span {
  color: var(--accent);
  position: relative;
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

body.light-mode .hero-text p {
  color: #6c757d;
}

.profile-img-container {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.profile-img {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 0 30px rgba(100, 255, 218, 0.3);
  transition: all 0.3s;
}

.profile-img:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 25px rgba(100, 255, 218, 0.7);
}

.btn-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(100, 255, 218, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: rgba(100, 255, 218, 0.1);
  transform: translateY(-3px);
}

.hero-pattern {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  font-size: 20rem;
  font-weight: 900;
  color: var(--accent);
  z-index: 1;
  user-select: none;
}

/* Sections */
section {
  padding: 6rem 0;
  position: relative;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://placehold.co/1920x1080") center/cover no-repeat;
  opacity: 0.02;
  z-index: -1;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60%;
  height: 3px;
  background: var(--accent);
}

.section-content {
  margin-top: 2rem;
}

/* About */
.about-section {
  background: var(--secondary);
}

body.light-mode .about-section {
  background: #e9ecef;
}

.about-content {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.about-skills {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-tag {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s;
}

body.light-mode .skill-tag {
  background: rgba(0, 150, 136, 0.1);
}

.skill-tag:hover {
  transform: translateY(-3px);
  background: var(--accent);
  color: var(--primary);
  box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}
/* Education Section */
.education-section {
  background: var(--secondary);
  position: relative;
  overflow: hidden;
}

body.light-mode .education-section {
  background: #e9ecef;
}

.education-timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.education-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0.3;
}

.education-item {
  display: flex;
  justify-content: flex-end;
  padding-right: 30px;
  position: relative;
  margin-bottom: 3rem;
  width: 50%;
  clear: both;
}

.education-item:nth-child(even) {
  align-self: flex-end;
  justify-content: flex-start;
  padding-left: 30px;
  padding-right: 0;
  left: 50%;
}

.education-content {
  background: var(--primary);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  position: relative;
  transition: all 0.3s ease;
}

body.light-mode .education-content {
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.education-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(100, 255, 218, 0.2);
}

.education-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  top: 20px;
  z-index: 1;
}

.education-item .education-icon {
  right: -25px;
}

.education-item:nth-child(even) .education-icon {
  left: -25px;
}

.education-year {
  display: inline-block;
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.education-content h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.education-content h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 500;
}

body.light-mode .education-content h4 {
  color: var(--light-text);
}

.education-content p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

body.light-mode .education-content p {
  color: #6c757d;
}

.education-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.education-tag {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

body.light-mode .education-tag {
  background: rgba(0, 150, 136, 0.1);
}

/* Responsive Design for Education Section */
@media (max-width: 992px) {
  .education-timeline::before {
    left: 30px;
  }
  
  .education-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 0;
  }
  
  .education-item:nth-child(even) {
    left: 0;
    padding-left: 70px;
  }
  
  .education-item .education-icon {
    left: 20px;
    right: auto;
  }
  
  .education-item:nth-child(even) .education-icon {
    left: 20px;
  }
}

@media (max-width: 576px) {
  .education-content {
    padding: 1.2rem;
  }
  
  .education-content h3 {
    font-size: 1.1rem;
  }
  
  .education-tags {
    gap: 0.3rem;
  }
  
  .education-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
}

/* Skills */
.skills-section {
  background: var(--primary);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--secondary);
  padding: 2rem;
  border-radius: 10px;
  transition: all 0.3s;
}

body.light-mode .skill-category {
  background: #f1f3f5;
}

.skill-category:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.skill-category h3 {
  margin-bottom: 1.5rem;
  color: var(--accent);
  position: relative;
  padding-bottom: 0.5rem;
}

.skill-category h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.skill {
  margin-bottom: 1.5rem;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-bar {
  height: 10px;
  background: rgba(100, 255, 218, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

body.light-mode .skill-bar {
  background: rgba(0, 0, 0, 0.1);
}

.skill-level {
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

/* Projects - تحسينات Hover */
.projects-section {
  background: var(--secondary);
}

body.light-mode .projects-section {
  background: #e9ecef;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--primary);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
}

body.light-mode .project-card {
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(100, 255, 218, 0.2);
}

.project-card:hover::before {
  opacity: 1;
}

.project-img-container {
  position: relative;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 200px;
  object-fit: fill;
  transition: transform 0.5s ease;
  border-bottom: 3px solid var(--accent);
}

.project-card:hover .project-img {
  transform: scale(1.01);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links-overlay {
  display: flex;
  gap: 1rem;
}

.project-link-overlay {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-link-overlay:hover {
  transform: scale(1.01);
  box-shadow: 0 0 15px rgba(100, 255, 218, 0.7);
}

.project-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.project-info h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
  transition: color 0.3s ease;
}

.project-card:hover .project-info h3 {
  color: var(--text-primary);
}

body.light-mode .project-card:hover .project-info h3 {
  color: var(--light-text);
}

.project-info p {
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.project-card:hover .project-info p {
  color: var(--text-primary);
}

body.light-mode .project-card:hover .project-info p {
  color: var(--light-text);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tag {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-card:hover .project-tag {
  background: var(--accent);
  color: var(--primary);
}

body.light-mode .project-tag {
  background: rgba(0, 150, 136, 0.1);
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-link {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.project-link-primary {
  background: var(--accent);
  color: var(--primary);
}

.project-link-primary:hover {
  background: transparent;
  color: var(--accent);
  outline: 1px solid var(--accent);
}

.project-link-secondary {
  background: transparent;
  color: var(--accent);
  outline: 1px solid var(--accent);
}

.project-link-secondary:hover {
  background: var(--accent);
  color: var(--primary);
}

/* Certificates - تحسينات Hover */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.certificate-card {
  background: var(--secondary);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

body.light-mode .certificate-card {
  background: white;
}

.certificate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.certificate-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(100, 255, 218, 0.2);
}

.certificate-card:hover::before {
  opacity: 1;
}

.certificate-img-container {
  position: relative;
  overflow: hidden;
}

.certificate-img {
  width: 100%;
  height: 200px;
  object-fit: fill;
  transition: transform 0.5s ease;
}

.certificate-card:hover .certificate-img {
  transform: scale(1.01);
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certificate-card:hover .certificate-overlay {
  opacity: 1;
}

.certificate-link-overlay {
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.certificate-link-overlay:hover {
  transform: scale(1.01);
  box-shadow: 0 0 15px rgba(100, 255, 218, 0.7);
}

.certificate-info {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.certificate-info h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
  transition: color 0.3s ease;
}

.certificate-card:hover .certificate-info h3 {
  color: var(--text-primary);
}

body.light-mode .certificate-card:hover .certificate-info h3 {
  color: var(--light-text);
}

.certificate-info p {
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.certificate-card:hover .certificate-info p {
  color: var(--text-primary);
}

body.light-mode .certificate-card:hover .certificate-info p {
  color: var(--light-text);
}

.certificate-date {
  display: inline-block;
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.certificate-card:hover .certificate-date {
  background: var(--accent);
  color: var(--primary);
}

/* Contact */
.contact-section {
  background: var(--primary);
}

.contact-content {
  display: flex;
  gap: 3rem;
}

.contact-info {
  flex: 1;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(100, 255, 218, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
  transition: all 0.3s;
}

.info-item:hover .info-icon {
  background: var(--accent);
  color: var(--primary);
  transform: scale(1.1);
}

.info-text h3 {
  margin-bottom: 0.2rem;
}

.info-text a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s;
}

body.light-mode .info-text a {
  color: #6c757d;
}

.info-text a:hover {
  color: var(--accent);
}

.contact-form {
  flex: 1;
  background: var(--secondary);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .contact-form {
  background: white;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 5px;
  background: transparent;
  color: var(--text-primary);
  transition: all 0.3s;
}

body.light-mode .form-control {
  border: 1px solid #dee2e6;
  color: var(--light-text);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  background: var(--secondary);
  padding: 2rem 0;
  text-align: center;
}

body.light-mode footer {
  background: #e9ecef;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(100, 255, 218, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s;
}

body.light-mode .social-links a {
  background: rgba(0, 150, 136, 0.1);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  color: var(--text-secondary);
}

body.light-mode .copyright {
  color: #6c757d;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(100, 255, 218, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.fadeIn {
  animation-name: fadeIn;
}

.slideInUp {
  animation-name: slideInUp;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 1200px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    margin-bottom: 3rem;
  }

  .btn-group {
    justify-content: center;
  }

  .about-content {
    flex-direction: column;
  }

  .about-skills {
    margin-top: 2rem;
  }

  .contact-content {
    flex-direction: column;
  }

  .contact-info {
    margin-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--secondary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
    z-index: 1000;
  }

  body.light-mode .nav-links {
    background: white;
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: block;
    z-index: 1001;
  }

  .nav-links li {
    margin: 1rem 0;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .btn-group {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  @media (max-width: 768px) {
    .hamburger {
      display: block;
      position: absolute;
      top: 1.5rem;
      right: 1.5rem;
      z-index: 1001;
    }

    .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 70%;
      height: 100vh;
      background: var(--secondary);
      flex-direction: column;
      justify-content: center;
      align-items: center;
      transition: all 0.5s ease;
      z-index: 1000;
    }

    body.light-mode .nav-links {
      background: white;
    }

    .nav-links.active {
      right: 0;
    }

    .nav-links li {
      margin: 1rem 0;
    }

    /* تعديل باقي الأقسام */
    .hero-content,
    .about-content,
    .contact-content {
      flex-direction: column;
      gap: 2rem;
      text-align: center;
      padding: 1rem;
    }

    .btn-group {
      flex-direction: column;
      gap: 1rem;
      justify-content: center;
    }

    .btn {
      width: 100%;
      justify-content: center;
    }
  }
}

/* اخفاء الـ skills على الموبايل */
/* @media (max-width: 576px) {
  .about-skills {
    display: none;
  }
} */
@media (max-width: 576px) {
  .about-skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* عمودين متساويين */
    gap: 15px; /* مسافة بين الأعمدة والصفوف */
  }
}



/* تحسينات عامة للموبايل */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 0 15px;
  }
  
  section {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  /* تحسينات لبطاقات المشاريع على الموبايل */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-card, .certificate-card {
    max-width: 100%;
  }
  
  .project-overlay, .certificate-overlay {
    opacity: 1;
    background: rgba(10, 25, 47, 0.7);
  }
  
  .project-links-overlay, .certificate-link-overlay {
    transform: scale(0.9);
  }
}

/* تحسينات الهيدر والتنقل */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem 0;
  }
  
  .nav-container {
    padding: 0 15px;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .theme-toggle {
    margin-left: 1rem;
    margin-right: 1rem;
    font-size: 1.3rem;
  }
  
  .hamburger {
    right: 15px;
    top: 1.2rem;
  }
  
  .nav-links {
    width: 80%;
    padding: 2rem;
  }
  
  .nav-links li a {
    font-size: 1.1rem;
    padding: 0.8rem;
  }
}

/* تحسينات قسم البطل */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 70px;
    min-height: 90vh;
  }
  
  .hero-content {
    padding: 0 10px;
    gap: 2rem;
  }
  
  .hero-text h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .profile-img {
    width: 250px;
    height: 250px;
  }
  
  .hero-pattern {
    font-size: 10rem;
  }
}

/* تحسينات قسم التعليم */
@media (max-width: 768px) {
  .education-timeline::before {
    left: 20px;
  }
  
  .education-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
  }
  
  .education-item:nth-child(even) {
    left: 0;
    padding-left: 50px;
  }
  
  .education-item .education-icon {
    left: 10px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .education-content {
    padding: 1.2rem;
  }
  
  .education-content h3 {
    font-size: 1.1rem;
  }
  
  .education-content h4 {
    font-size: 0.9rem;
  }
}

/* تحسينات قسم المهارات */
@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .skill-category {
    padding: 1.5rem;
  }
  
  .skill-category h3 {
    font-size: 1.2rem;
  }
}

/* تحسينات قسم الشهادات */
@media (max-width: 768px) {
  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .certificate-info {
    padding: 1.2rem;
  }
  
  .certificate-info h3 {
    font-size: 1.1rem;
  }
}

/* تحسينات قسم التواصل */
@media (max-width: 768px) {
  .contact-content {
    gap: 2rem;
  }
  
  .info-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
}

/* تحسينات الفوتر */
@media (max-width: 768px) {
  footer {
    padding: 1.5rem 0;
  }
  
  .social-links {
    gap: 1rem;
  }
  
  .social-links a {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .copyright {
    font-size: 0.9rem;
  }
}

/* تحسينات زر العودة للأعلى */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 360px) {
  .hero-text h1 {
    font-size: 1.7rem;
  }
  
  .profile-img {
    width: 200px;
    height: 200px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .project-card, .certificate-card {
    border-radius: 8px;
  }
  
  .project-info, .certificate-info {
    padding: 1rem;
  }
}