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

html {
  scroll-behavior: smooth;
}

.skip-to-main {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.3s ease;
}

.skip-to-main:focus {
  top: 10px;
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

:root {
  --primary-color: #0f172a;
  --secondary-color: #475569;
  --accent-color: #3b82f6;
  --bg-color: #ffffff;
  --text-color: #1e293b;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --primary-color: #e2e8f0;
  --secondary-color: #94a3b8;
  --accent-color: #60a5fa;
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --border-color: #334155;
  --card-bg: #1e293b;
  --shadow-color: rgba(0, 0, 0, 0.5);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 20px;
  color: var(--text-color);
  line-height: 1.6;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .status-indicator {
    animation: none !important;
  }
}

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

[data-theme="dark"] .main-nav {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  gap: 20px;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
  justify-content: center;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.3px;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.nav-brand:hover {
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1e3a8a, #3b82f6);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--accent-color);
}

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

.nav-link.active {
  color: var(--accent-color);
}

.nav-link.active::after {
  width: 100%;
}

.container {
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  padding: 60px 40px 40px;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  animation: fadeIn 0.6s ease-out;
}

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

.content {
  text-align: center;
}

.header {
  margin-bottom: 30px;
}

.name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #1e3a8a, #3b82f6);
  margin: 0 auto;
  border-radius: 2px;
}

.tagline {
  font-size: 1.25rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: 400;
}

.description {
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: 40px;
  line-height: 1.7;
}

.links {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.link-button svg {
  width: 20px;
  height: 20px;
}

.about-me {
  margin: 40px 0;
  padding: 30px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
}

.about-content {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about-photo {
  flex-shrink: 0;
}

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
  border: 3px solid var(--accent-color);
}

.about-text {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.about-intro {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 15px;
  line-height: 1.7;
}

.about-story {
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: 25px;
  line-height: 1.7;
}

.skills {
  margin-top: 20px;
}

.skills-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.skills-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.skill {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(
    135deg,
    rgba(30, 58, 138, 0.1) 0%,
    rgba(59, 130, 246, 0.1) 100%
  );
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill:hover,
.skill:focus-visible {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.projects {
  margin: 40px 0;
}

.projects-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
}

.project-card {
  background: linear-gradient(
    135deg,
    rgba(30, 58, 138, 0.05) 0%,
    rgba(59, 130, 246, 0.05) 100%
  );
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
  border-color: var(--accent-color);
}

.project-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}
.project-logo {
  width: 160px;
  height: 160px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.store-badges {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.store-badge {
  display: inline-block;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.store-badge:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.store-badge img {
  height: 60px;
  width: auto;
  display: block;
}

.store-badge.google-play img {
  height: 88px;
}
.project-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.project-description {
  font-size: 1rem;
  color: var(--secondary-color);
  line-height: 1.6;
  margin-bottom: 15px;
}

.website-link {
  margin: 15px 0;
  font-size: 1rem;
}

.website-link a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.website-link a:hover {
  color: #1e3a8a;
  transform: translateX(3px);
}

.project-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: var(--secondary-color);
}

@media (max-width: 600px) {
  .container {
    padding: 40px 30px 30px;
  }

  .name {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .description {
    font-size: 0.95rem;
  }

  .link-button {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .photo-placeholder {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
  }

  .about-text {
    min-width: 100%;
  }

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

  .about-story {
    font-size: 0.95rem;
  }

  .skills-grid {
    justify-content: center;
  }

  .projects-title {
    font-size: 1.5rem;
  }

  .project-card {
    padding: 25px;
  }

  .project-name {
    font-size: 1.3rem;
  }

  .project-description {
    font-size: 0.95rem;
  }
}

@media (max-width: 400px) {
  .name {
    font-size: 1.75rem;
  }

  .container {
    padding: 30px 20px 20px;
  }
}

.nav-toggle {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: auto;
  color: var(--secondary-color);
  flex-shrink: 0;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--border-color);
  color: var(--primary-color);
  transform: none;
  box-shadow: none;
}

.theme-toggle {
  font-weight: 700;
  font-size: 0.9rem;
}

.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

.language-toggle {
  font-weight: 700;
  font-size: 0.9rem;
}

.language-toggle .lang-en {
  display: block;
}

.language-toggle .lang-ar {
  display: none;
}

[lang="ar"] .language-toggle .lang-en {
  display: none;
}

[lang="ar"] .language-toggle .lang-ar {
  display: block;
}

[dir="rtl"] .container {
  text-align: right;
}

[dir="rtl"] .content {
  text-align: center;
}

[dir="rtl"] .about-content {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-container {
  flex-direction: row-reverse;
}

@media (max-width: 900px) {
  .nav-container {
    padding: 0 8px;
    height: 55px;
    gap: 4px;
  }

  .nav-center {
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    justify-content: center;
  }

  .nav-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.65rem;
    flex-shrink: 0;
    border-radius: 6px;
    padding: 0;
  }

  .nav-toggle svg {
    width: 14px;
    height: 14px;
  }

  .nav-brand {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .nav-links {
    display: flex;
    gap: 8px;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 4px 0;
  }

  body {
    padding: 70px 15px 15px;
  }

  [dir="rtl"] .about-content {
    flex-direction: column;
  }
}

[dir="rtl"] .about-text {
  text-align: right;
}

[dir="rtl"] .skills-grid {
  justify-content: flex-end;
}

[dir="rtl"] .project-tags {
  justify-content: center;
}

[dir="rtl"] .link-button {
  flex-direction: row-reverse;
}

[dir="rtl"] .website-link a::after {
  content: " ←";
}

[dir="rtl"] .website-link a {
  direction: rtl;
}

.contact-section {
  margin-bottom: 40px;
}

.availability-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 25px;
  padding: 10px 20px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 25px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.status-indicator {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.status-text {
  color: #22c55e;
  font-weight: 600;
  font-size: 0.9rem;
}

[data-theme="dark"] .availability-status {
  background: rgba(34, 197, 94, 0.15);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

[data-theme="dark"] .modal-content {
  background: #1e293b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #64748b;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: #f1f5f9;
  color: #1e293b;
}

[data-theme="dark"] .modal-close {
  color: #94a3b8;
}

[data-theme="dark"] .modal-close:hover,
[data-theme="dark"] .modal-close:focus-visible {
  background: #334155;
  color: #e2e8f0;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .modal-title {
  background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

[data-theme="dark"] .form-label {
  color: #e2e8f0;
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
  background: white;
  color: #1e293b;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .form-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .form-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
  padding: 14px 28px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

.form-submit:hover,
.form-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.form-submit:active {
  transform: translateY(0);
}

.resume-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
}

.resume-btn:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

[dir="rtl"] .modal-close {
  right: auto;
  left: 15px;
}

[dir="rtl"] .form-label {
  text-align: right;
}

[dir="rtl"] .form-input {
  text-align: right;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 30px 20px;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .availability-status {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .status-indicator {
    width: 8px;
    height: 8px;
  }
}

