/* Custom Properties */
:root {
  --primary: #FFB800; /* Yellow/Orange */
  --primary-dark: #cc9300;
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --surface: #141414;
  --surface-light: #222222;
  --text-main: #f5f5f5;
  --text-muted: #9e9e9e;
  --border-color: #333333;
  
  --font-heading: 'Cairo', sans-serif;
  --font-body: 'Tajawal', sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

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

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

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

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

.bg-dark {
  background-color: var(--bg-dark);
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-normal);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-darker);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

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

.btn-block {
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.title-line {
  height: 3px;
  width: 60px;
  background-color: var(--primary);
  margin: 0 auto 15px auto;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo a {
  display: flex;
  align-items: baseline;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
}

.logo-dot {
  color: var(--primary);
  font-size: 2rem;
  line-height: 0;
}

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

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0; /* RTL alignment */
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background: url('https://images.unsplash.com/photo-1518173946687-a4c8892bbd9f?auto=format&fit=crop&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.6) 50%, rgba(5,5,5,0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

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

.hero-text h1 {
  font-size: 4.5rem;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero-text .subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-family: var(--font-heading);
}

.hero-actions {
  display: flex;
  gap: 15px;
}

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

.about-text .lead {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

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

.stats {
  display: flex;
  gap: 40px;
  margin-top: 30px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

.image-wrapper {
  position: relative;
  border-radius: 4px;
}

.image-wrapper img {
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border: 1px solid var(--border-color);
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background-color: var(--primary);
  color: var(--bg-darker);
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(255, 184, 0, 0.3);
}

.experience-badge .years {
  font-size: 1.8rem;
  line-height: 1;
}

.experience-badge .text {
  font-size: 1rem;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--surface);
  padding: 40px 30px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  border-bottom: 3px solid var(--border-color);
  transition: var(--transition-normal);
  text-align: center;
}

.service-card:hover {
  border-bottom-color: var(--primary);
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.service-icon {
  width: 70px;
  height: 70px;
  background-color: var(--surface-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  font-size: 1.8rem;
  color: var(--primary);
  transition: var(--transition-normal);
}

.service-card:hover .service-icon {
  background-color: var(--primary);
  color: var(--bg-darker);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  height: 300px;
  cursor: pointer;
}

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

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

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  transform: translateY(0);
  opacity: 1; /* Always visible for better UX */
}

.project-info h3 {
  color: var(--primary);
  margin-bottom: 5px;
  transform: translateY(10px);
  transition: var(--transition-normal);
}

.project-info span {
  color: #fff;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  display: block;
  transition: var(--transition-normal);
}

.project-card:hover .project-info h3,
.project-card:focus-within .project-info h3 {
  transform: translateY(0);
}

.project-card:hover .project-info span,
.project-card:focus-within .project-info span {
  opacity: 1;
  transform: translateY(0);
}

/* Contact */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
}

.icon-box {
  width: 50px;
  height: 50px;
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--primary);
  font-size: 1.2rem;
}

.info-details h4 {
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.info-details p {
  color: var(--text-muted);
}

form {
  background-color: var(--surface);
  padding: 40px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

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

input, textarea {
  width: 100%;
  padding: 15px;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 4px;
  font-family: var(--font-body);
  transition: var(--transition-normal);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Footer */
.footer {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-logo h2 {
  font-size: 2rem;
}

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

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

.social-links a:hover {
  background-color: var(--primary);
  color: var(--bg-darker);
}

.copyright p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 992px) {
  .about-content, .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .experience-badge {
    right: 20px;
  }

  .hero-text h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block !important;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--surface);
    flex-direction: column;
    padding-top: 100px;
    transition: var(--transition-normal);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links ul {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }
  
  .project-info h3 { transform: translateY(0); }
  .project-info span { opacity: 1; transform: translateY(0); }
}
