/* 
  NEON MATRIX THEME 
  Author: AI Assistant
*/

:root {
  /* Color Palette */
  --bg-dark: #0a0a0f;
  --bg-darker: #050508;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;

  /* Neon Accents */
  --neon-cyan: #00f3ff;
  --neon-purple: #bc13fe;
  --neon-magenta: #ff0055;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);

  /* Gradients */
  --gradient-neon: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  --gradient-glow: linear-gradient(45deg, rgba(0, 243, 255, 0.15), rgba(188, 19, 254, 0.15));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

html[dir="rtl"] {
  font-family: 'Cairo', sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 40vw;
  height: 40vw;
  background: var(--neon-purple);
  top: -10vw;
  left: -10vw;
}

.orb-2 {
  width: 30vw;
  height: 30vw;
  background: var(--neon-cyan);
  bottom: 0;
  right: -5vw;
  animation-delay: -5s;
}

.orb-3 {
  width: 25vw;
  height: 25vw;
  background: var(--neon-magenta);
  top: 40%;
  left: 30%;
  opacity: 0.2;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(2%, 2%) scale(1.02);
  }

  100% {
    transform: translate(-2%, -2%) scale(0.98);
  }
}

/* Typography & Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
}

.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-12 {
  margin-top: 3rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.relative {
  position: relative;
}

.icon-sm {
  width: 1.25rem;
  height: 1.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

html[dir="rtl"] .mr-2 {
  margin-right: 0;
  margin-left: 0.5rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

html[dir="rtl"] .ml-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Neon Text Utilities */
.neon-text {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  /* Fallback */
  text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
  display: inline-block;
}

/* Glass Panels & Cards */
.glass-panel,
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
  padding: 2.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 243, 255, 0.4);
  box-shadow: 0 10px 40px rgba(0, 243, 255, 0.15);
}

/* Nav Bar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-neon);
  transition: width 0.3s ease;
}

html[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  flex-direction: column;
  text-align: center;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--glass-border);
}

/* Sections */
.section {
  padding: 8rem 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.subsection-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--neon-cyan);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  position: relative;
}

.hero-content {
  max-width: 800px;
  z-index: 10;
}

/* Glitch Effect */
.glitch {
  font-size: 4rem;
  font-weight: 800;
  position: relative;
  display: inline-block;
  color: var(--text-main);
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.subtitle {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 1rem;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  padding: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Buttons */
.neon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.primary-btn {
  background: var(--gradient-neon);
  color: #fff;
  border: none;
  box-shadow: 0 0 20px rgba(188, 19, 254, 0.4);
}

.primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
  z-index: -1;
  transition: opacity 0.5s ease;
  opacity: 0;
}

.primary-btn:hover::before {
  opacity: 1;
}

.primary-btn:hover {
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
  transform: translateY(-2px);
}

.outline-btn {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--neon-cyan);
}

.outline-btn:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* Pulse Glow */
.pulse-glow {
  -webkit-animation: pulseGlow 2s infinite alternate;
  animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
  }

  100% {
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.6);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bounce 2s infinite;
}

.mouse {
  width: 24px;
  height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 2px;
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, 15px);
    opacity: 0;
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }

  40% {
    transform: translateY(-10px) translateX(-50%);
  }

  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* Skills */
.skills-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.skill-tag {
  background: rgba(0, 243, 255, 0.05);
  border: 1px solid rgba(0, 243, 255, 0.2);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-tag::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.skill-tag:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
  color: var(--neon-cyan);
  transform: translateY(-3px);
}

.skill-tag:hover::after {
  left: 100%;
}

/* Projects Section */
.projects-section {
  background: linear-gradient(180deg, var(--bg-dark), var(--bg-darker));
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.project-card:hover::before {
  opacity: 1;
}

.project-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-tag {
  align-self: flex-start;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--neon-magenta);
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.project-desc {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  color: var(--neon-cyan);
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
  transition: all 0.3s ease;
}

.arrow-icon {
  width: 20px;
  height: 20px;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

html[dir="rtl"] .arrow-icon {
  margin-left: 0;
  margin-right: 8px;
  transform: rotate(180deg);
}

.project-link:hover {
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.project-link:hover .arrow-icon {
  transform: translateX(5px);
}

html[dir="rtl"] .project-link:hover .arrow-icon {
  transform: translateX(-5px) rotate(180deg);
}

/* Social Icons */
.social-links {
  display: flex;
  gap: 1rem;
}

.justify-center {
  justify-content: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-5px);
  background: var(--neon-cyan);
  color: var(--bg-dark);
  box-shadow: 0 10px 20px rgba(0, 243, 255, 0.4);
  border-color: transparent;
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background: var(--bg-darker);
  border-top: 1px solid var(--glass-border);
  position: relative;
}

/* Intersection Observer Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

html[dir="rtl"] .reveal-left {
  transform: translateX(50px);
}

html[dir="rtl"] .reveal-right {
  transform: translateX(-50px);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
  opacity: 1;
  transform: translate(0, 0);
}

/* Media Queries */
@media (max-width: 1024px) {
  .hero-content {
    gap: 2rem;
  }

  .glitch {
    font-size: 3.5rem;
  }

  .section {
    padding: 6rem 0;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .skills-flex {
    justify-content: center;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {

  .nav-links,
  .logo,
  .mobile-menu-btn {
    display: none !important;
  }

  .navbar {
    background: transparent;
    border-bottom: none;
    pointer-events: none;
  }

  .nav-content {
    justify-content: flex-end;
  }

  .nav-controls {
    pointer-events: auto;
  }

  .glitch {
    font-size: 3rem;
  }

  .subtitle {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .profile-img-container {
    width: 180px;
    height: 180px;
  }

  .scroll-indicator {
    bottom: -60px;
  }
}

@media (max-width: 480px) {
  .glitch {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-desc {
    padding: 1rem;
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .neon-btn {
    width: 100%;
  }

  .profile-img-container {
    width: 150px;
    height: 150px;
  }

  .glass-card {
    padding: 1.5rem;
  }
}

.profile-img-container {
  width: 250px;
  height: 250px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 6px;
  background: var(--gradient-neon);
  animation: float 6s infinite ease-in-out alternate;
  box-shadow: 0 10px 30px rgba(0, 243, 255, 0.3);
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-dark);
}


.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1000px;
  text-align: left;
}

html[dir="rtl"] .hero-content {
  text-align: right;
}

.hero-text {
  flex: 1;
}

@media (max-width: 768px) {
  .hero {
    align-items: flex-start;
    padding-top: 100px;
    padding-bottom: 80px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  html[dir="rtl"] .hero-content {
    text-align: center;
  }
}

.justify-start {
  justify-content: flex-start;
}

html[dir="rtl"] .justify-start {
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .hero-actions {
    justify-content: center;
  }

  .justify-start {
    justify-content: center;
  }
}
