/* CSS Custom Properties (Variables) */
:root {
  --bg-color: #090a0f;
  --surface-color: #121520;
  --surface-light: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --primary-color: #3b82f6;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --gradient-main: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-hover: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
  
  --font-family: 'Cairo', sans-serif;
  --transition: all 0.3s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.section-padding {
  padding: 100px 0;
}

/* Background Animated Shapes */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  animation: float 20s infinite alternate;
}

.bg-shape-1 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.15);
  top: -100px;
  right: -100px;
}

.bg-shape-2 {
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.15);
  bottom: 20%;
  left: -200px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(50px, 50px) rotate(10deg); }
}

/* Typography & Utility */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

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

.color-primary {
  color: var(--primary-color);
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--surface-light);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 50px auto;
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(-5px); /* RTL */
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--gradient-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--surface-light);
  border-color: var(--primary-color);
}

/* Header & Navbar */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(18, 21, 32, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: var(--transition);
}

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

.btn-contact {
  padding: 8px 20px;
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  color: var(--text-main);
}

.btn-contact::after {
  display: none;
}

.btn-contact:hover {
  background: var(--primary-color);
  color: white;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--bg-color));
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.hero-text {
  max-width: 800px;
}

.greeting {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
  display: inline-block;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--text-muted);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

/* About Section */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  border-radius: 20px;
  padding: 20px;
}

.about-image-glow {
  position: absolute;
  inset: 0;
  background: var(--gradient-main);
  filter: blur(20px);
  opacity: 0.2;
  border-radius: 20px;
  z-index: 0;
}

.about-image {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: block;
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 2;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.exp-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.exp-text {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.stat-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.stat-item i {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-top: 5px;
}

.stat-item h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.stat-item p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.skill-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 40px 30px;
  border-radius: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: right;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-main);
  opacity: 0;
  z-index: -1;
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
}

/* Add a very subtle gradient glow on hover */
.skill-card:hover::before {
  opacity: 0.05;
}

.skill-icon-box {
  width: 70px;
  height: 70px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 25px;
  background: var(--surface-light);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

/* Custom Icon Colors */
.skill-blue { color: #3b82f6; }
.skill-purple { color: #8b5cf6; }
.skill-red { color: #ef4444; }
.skill-orange { color: #f97316; }
.skill-green { color: #10b981; }
.skill-cyan { color: #06b6d4; }

.skill-card:hover .skill-icon-box {
  transform: scale(1.1);
}
.skill-card:hover .skill-blue { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); }
.skill-card:hover .skill-purple { background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.3); }
.skill-card:hover .skill-red { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.skill-card:hover .skill-orange { background: rgba(249, 115, 22, 0.1); border-color: rgba(249, 115, 22, 0.3); }
.skill-card:hover .skill-green { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); }
.skill-card:hover .skill-cyan { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.3); }

.skill-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.skill-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Footer & Contact */
.footer {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-info p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-light);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.footer-links h3, .footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-links h3::after, .footer-contact h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-color);
}

.footer-links ul li, .footer-contact ul li {
  margin-bottom: 15px;
}

.footer-links ul li a {
  color: var(--text-muted);
  display: inline-block;
}

.footer-links ul li a:hover {
  color: var(--primary-color);
  transform: translateX(-5px);
}

.footer-contact ul li {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact ul li i {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s ease-out;
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.visible {
  opacity: 1;
  transform: translateY(0);
  transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-title { font-size: 3.5rem; }
  .hero-subtitle { font-size: 1.8rem; }
  .about-container { grid-template-columns: 1fr; }
  .about-image-wrapper { order: -1; max-width: 500px; margin: 0 auto; }
  .footer-content { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: var(--transition);
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .mobile-toggle { display: block; }
  
  .hero-title { font-size: 2.8rem; }
  .hero-subtitle { font-size: 1.5rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { justify-content: center; }
  
  .skills-grid { grid-template-columns: 1fr; }
}
