﻿@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #7928ca;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --gradient: linear-gradient(135deg, #00d4ff 0%, #7928ca 100%);
    --gradient-hover: linear-gradient(135deg, #7928ca 0%, #ff0080 100%);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glitch animation removed - title is now static */

.hero-text h2 {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.typed-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    min-height: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Code Animation */
.hero-image {
    position: relative;
    height: 400px;
}

.code-animation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.code-line {
    height: 8px;
    background: var(--gradient);
    border-radius: 4px;
    animation: codeSlide 2s ease-in-out infinite;
    opacity: 0.6;
}

.code-line:nth-child(1) {
    width: 80%;
    animation-delay: 0s;
}

.code-line:nth-child(2) {
    width: 60%;
    animation-delay: 0.3s;
}

.code-line:nth-child(3) {
    width: 70%;
    animation-delay: 0.6s;
}

.code-line:nth-child(4) {
    width: 90%;
    animation-delay: 0.9s;
}

@keyframes codeSlide {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.6;
    }
    50% {
        transform: translateX(20px);
        opacity: 1;
    }
}

/* Section Title */
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    padding: 5rem 0;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.skill-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.skill-item i {
    font-size: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.skill-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill-item p {
    color: var(--text-secondary);
}

/* Projects Section */
.projects {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, #0f0f0f 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

.project-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-icon i {
    font-size: 2rem;
    color: white;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
}

.contact-content {
    text-align: center;
}

.contact-text p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
    min-width: 150px;
}

.social-link:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.social-link i {
    font-size: 3rem;
}

.github:hover {
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.youtube:hover {
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.youtube i {
    color: #ff0000;
}

.whatsapp:hover {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.whatsapp i {
    color: #25d366;
}
.linkedin:hover {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.linkedin i {
    color: #2562d3;
}


/* Footer */
.footer {
    background: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer i {
    color: #ff0080;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text h2 {
        font-size: 1.3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        height: 200px;
    }

    .section-title {
        font-size: 2rem;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }
}
/* ===========================
   Corrected Styles for "التقنيات" section
   =========================== */

:root{
  --bg: #0f1724;
  --card-bg: #0b1220;
  --accent-1: #3b82f6;
  --accent-2: #7c3aed;
  --text: #e6eef8;
  --muted: #9fb1cc;
  --glass: rgba(255,255,255,0.04);
  --icon-size: 42px;
  --gap: 18px;
  --radius: 14px;
}

/* section container */
.tools{
  padding: 60px 20px;
  background: linear-gradient(180deg, rgba(59,130,246,0.03), rgba(124,58,237,0.03));
  direction: rtl;
}

/* title */
.tools .section-title{
  font-size: 24px;            /* أصغر ومناسب */
  font-weight: 700;
  color: var(--text);
  margin: 0 0 18px 0;
  text-align: center;
  letter-spacing: 0.2px;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59,130,246,0.12), rgba(124,58,237,0.12));
}

/* icons wrapper */
.tools-icons{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: var(--gap);
  align-items: center;
  justify-items: center;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 12px;
}

/* each icon container */
.tools-icons .icon-box{
  width: 130px;
  height: 130px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  box-shadow: 0 6px 18px rgba(2,6,23,0.45);
  transition: transform 280ms cubic-bezier(.2,.9,.3,1), box-shadow 280ms;
  position: relative;
  overflow: hidden;
  color: var(--text);
}

/* the actual Font Awesome icon glyph */
.tools-icons .icon-box .fab,
.tools-icons .icon-box .fas{
  font-size: var(--icon-size);
  line-height: 1;
}

/* gradient overlay */
.tools-icons .icon-box::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(59,130,246,0.12), rgba(124,58,237,0.12));
  opacity: 0;
  transition: opacity 320ms;
}

/* hover effect */
.tools-icons .icon-box:hover{
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 18px 40px rgba(59,130,246,0.12);
}
.tools-icons .icon-box:hover::after{
  opacity: 1;
}

/* optional label under icon */
.tools-icons .tool-label{
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* responsive */
@media (max-width: 980px){
  .tools-icons{
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px;
  }
  .tools-icons .icon-box{
    height: 110px;
    width: 110px;
  }
  :root{ --icon-size: 36px; }
}

@media (max-width: 560px){
  .tools .section-title{ font-size: 20px; padding: 6px 12px; }
  .tools-icons{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    padding: 6px;
  }
  .tools-icons .icon-box{
    height: 96px;
    width: 96px;
    border-radius: 10px;
  }
  :root{ --icon-size: 32px; }
}

/* entry animation */
@keyframes popUp {
  0%{ transform: translateY(14px) scale(.98); opacity: 0; }
  60%{ transform: translateY(-6px) scale(1.02); opacity: 1; }
  100%{ transform: translateY(0) scale(1); opacity: 1; }
}
.tools-icons .icon-box{
  will-change: transform, opacity;
  animation: popUp 600ms ease both;
}
.tools-icons .icon-box:nth-child(1){ animation-delay: 0ms; }
.tools-icons .icon-box:nth-child(2){ animation-delay: 60ms; }
.tools-icons .icon-box:nth-child(3){ animation-delay: 120ms; }
.tools-icons .icon-box:nth-child(4){ animation-delay: 180ms; }
.tools-icons .icon-box:nth-child(5){ animation-delay: 240ms; }

/* Dark mode */
body.dark .tools{
  background: linear-gradient(180deg, rgba(12,16,24,0.25), rgba(6,8,14,0.25));
}
