/* === Variables & Theme === */
:root {
  --primary-color: #ff335f; /* Modern Vibrant Pink/Red */
  --hover-color: #d02046;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8; /* Cyan accent */

  --font-main: "Cairo", sans-serif;

  --container-width: 1200px;
  --radius: 12px;
  --transition: 0.3s ease;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

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

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

ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
img {
  max-width: 100%;
  display: block;
}

/* === Utilities === */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 15px;
}

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

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

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
}

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

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

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

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

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

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.header.scrolled {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
  font-size: 28px;
  font-weight: 800;
  color: white;
}

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

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

.nav-links a {
  font-weight: 600;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}

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

.menu-btn {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* === Hero Section === */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)),
    url("../image/ali-khaled.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

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

.hero-subtitle {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.hero-title {
  font-size: 60px;
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 800;
}

.hero-text {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* === Headings === */
.section-header {
  margin-bottom: 60px;
}

.section-title {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 15px;
  color: white;
}

.section-subtitle {
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.about-img {
  position: relative;
}

.about-img img {
  border-radius: var(--radius);
  box-shadow: -20px 20px 0 var(--primary-color);
}

.about-text h3 {
  font-size: 30px;
  margin-bottom: 20px;
}

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

.about-list {
  margin-bottom: 30px;
}

.about-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-list i {
  color: var(--primary-color);
}

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

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

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}

.service-icon {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

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

.service-card p {
  color: var(--text-muted);
}

/* === Skills === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 30px;
  text-align: center;
}

.skill-card {
  background-color: var(--bg-card);
  padding: 30px 20px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.skill-card:hover {
  transform: scale(1.05);
  background-color: #2d3b55;
}
.skill-card svg {
  width: 34px;
  height: 40px;
  margin-bottom: 15px;
  color: #38bdf8;
}

.skill-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
}

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

.project-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

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

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.4s;
}

.project-card:hover .card-overlay {
  opacity: 1;
}

.card-content {
  padding: 25px;
}

.tags {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 51, 95, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.card-content h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.card-content p {
  color: var(--text-muted);
  font-size: 14px;
}

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

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

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 51, 95, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.social-media ul {
  display: flex;
  align-items: center;
  gap: 35px;
}

.social-media ul li {
  width: 50px;
  height: 50px;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

.social-media ul li.face a i {
  color: #1877f2;
  transition: 0.3s;
}
.social-media ul li.face:hover {
  background-color: #1877f2;
}

.social-media ul li.face:hover i {
  color: white;
  transform: scale(1.2);
}
.social-media ul li.linked a i {
  color: #0a66c2;
  transition: 0.3s;
}

.social-media ul li.linked:hover {
  background-color: #0a66c2;
}

.social-media ul li.linked:hover i {
  color: white;
  transform: scale(1.2);
}

.social-media ul li.insta a i {
  color: #fd1d1d;
  transition: 0.3s;
}

.social-media ul li.insta:hover {
  background-color: #fd1d1d;
}

.social-media ul li.insta:hover i {
  color: white;
  transform: scale(1.2);
}

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

.form-control {
  width: 100%;
  padding: 15px;
  background: var(--bg-card);
  border: 1px solid #2d3b55;
  border-radius: 8px;
  color: white;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea.form-control {
  resize: none;
  height: 150px;
}

/* === Footer === */
.footer {
  background-color: #0b1120;
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid #1e293b;
}

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

.footer a {
  color: var(--primary-color);
  font-weight: 700;
}

/* === Responsive === */
@media (max-width: 992px) {
  .hero-title {
    font-size: 45px;
  }
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-img img {
    box-shadow: none;
    margin-bottom: 30px;
  }
  .about-list {
    justify-content: center;
  }
  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  }

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

  .section-title {
    font-size: 32px;
  }
}
