/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* --- CSS Variables (Our Color Palette) --- */
:root {
    --dark-blue: #0a192f;        /* Deep background blue */
    --accent-dark-blue: #004d99; /* Darker shade of your main blue */
    --mid-blue: #112240;         /* Card/Section background */
    --light-text: #ccd6f6;       /* Main text color */
    --white-text: #e6f1ff;       /* Headings and bright text */
    --sky-blue: #87CEEB;         /* Accent Color (لبني) */
    --sky-blue-tint: rgba(135, 206, 235, 0.1); /* For transparent highlights */
    --vibrant-red: #C70039;      /* Based on the reference image's vibrant color */
}

/* --- Global & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-blue);
    color: var(--light-text);
    line-height: 1.6;
   
}

main {
    max-width: 1000px;
    margin: 0 auto; /* Center the content */
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3 {
    color: var(--white-text);
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    border-bottom: 3px solid var(--sky-blue);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 40px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--sky-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    filter: brightness(1.2);
}

/* --- Navigation Bar --- */
nav {
    background-color: var(--mid-blue);
    border-bottom: 1px solid var(--sky-blue);
    padding: 15px 0;
    position: fixed; /* تثبيته في الأعلى */
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-text);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: var(--light-text);
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    color: var(--sky-blue);
    border-bottom-color: var(--sky-blue);
}


/* --- Header / Hero Section (New & Improved) --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    
    padding-top: 100px; 
    overflow: hidden;
    background-color: var(--vibrant-red);
}

/* Gradient Overlay for the hero section (لبني مع الأحمر) */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--accent-dark-blue) 0%, var(--vibrant-red) 100%);
    opacity: 0.9; /* Adjust for desired intensity */
    z-index: 0;
}

.hero-container {
    position: relative; /* To be above the overlay */
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* More padding for a spacious feel */
    display: flex;
    flex-direction: row; /* Default: text then image */
    align-items: center;
    justify-content: space-between;
    gap: 60px; /* Increased gap */
    width: 100%;
}

.hero-text {
    flex: 1;
    text-align: left;
    color: var(--white-text); /* Ensure text is bright */
}

.hero-text h1 {
    font-size: 4.5rem; /* Larger, more impactful heading */
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--white-text); /* Ensure primary heading is white */
}

.hero-text p {
    font-size: 1.5rem; /* Larger tagline */
    margin: 0 0 40px;
    color: var(--light-text); /* Use light text for tagline */
}

.hero-image {
    flex-basis: 400px; /* Fixed width for the image container */
    height: 400px; /* Fixed height for the image container */
    min-width: 300px; /* Ensures image doesn't get too small */
    text-align: center;
    position: relative; /* For the subtle effect */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensure the full image is visible, not cut */
    border-radius: 50%; /* Circular image */
    border: 8px solid var(--sky-blue); /* Thicker border for impact */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); /* Stronger shadow for depth */
    transition: transform 0.5s ease; /* Smooth animation for hover */
}

.hero-image img:hover {
    transform: scale(1.03); /* Slight zoom on hover */
}

/* --- Background Graphics in Hero Section --- */ /*////////////////////////////////////////////*/

.bg-graphic-1, .bg-graphic-2 {
    position: absolute;
    opacity: 0.3;
    z-index: -1;
}
.bg-graphic-1 {
    width: 150px;
    top: 10%;
    left: 10%;
    transform: rotate(30deg);
}
.bg-graphic-2 {
    width: 100px;
    bottom: 15%;
    right: 5%;
    transform: rotate(-45deg);
}


/* --- CTA Button in Hero Section --- */
.hero .cta-button {
    background-color: var(--sky-blue);
    color: var(--dark-blue); /* Dark blue text on sky blue button */
    border: none;
    padding: 18px 35px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero .cta-button:hover {
    background-color: var(--white-text); /* Brighter on hover */
    color: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}


/* --- Main Content Layout --- */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    padding-top: 60px; /* Ensure content starts below the fixed navbar */
}


/* --- Skills Section --- */
#skills {
    background-color: var(--dark-blue); /* Use dark-blue for consistent background */
    padding: 80px 0;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center; /* Center the skill tags */
}

.skill-tag {
    background-color: var(--mid-blue);
    color: var(--white-text);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    border: 1px solid var(--sky-blue);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--sky-blue);
    color: var(--dark-blue);
    transform: translateY(-3px);
}


/* --- Projects Section --- */
#projects {
    background-color: var(--dark-blue); /* Consistent background */
    padding: 80px 0;
}

.project-card {
    background-color: var(--mid-blue);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--sky-blue);
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    font-size: 1.8rem; /* Slightly larger project title */
    color: var(--sky-blue);
}

.project-description {
    margin: 15px 0;
    color: var(--light-text);
}

.project-tech {
    font-style: italic;
    margin: 15px 0;
    color: var(--white-text);
}

.project-link {
    display: inline-block;
    background-color: var(--sky-blue);
    color: var(--dark-blue);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.project-link:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}


/* --- Contact Section --- */
#contact {
    text-align: center;
    background-color: var(--dark-blue);
    padding: 80px 0;
}

#contact h2 {
    color: var(--white-text);
}

#contact p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    border: 2px solid var(--sky-blue);
    color: var(--sky-blue);
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 20px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: var(--sky-blue-tint);
    color: var(--sky-blue);
    transform: translateY(-3px);
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--mid-blue);
    background-color: var(--mid-blue); /* Give footer a distinct background */
    color: var(--light-text);
}

.social-links a {
    font-size: 2rem;
    margin: 0 15px;
    color: var(--light-text);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--sky-blue);
    transform: scale(1.2);
}

footer p {
    margin-top: 20px;
    font-size: 0.9rem;
}

/* --- Responsive Design (for smaller screens) --- */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column; /* Stack text and image vertically */
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .hero-image {
        order: -1; /* Move image above text on smaller screens */
        margin-bottom: 30px;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-menu {
        gap: 15px;
    }
}


/* --- Scroll Animation --- */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}
/* --- Hero Buttons Container --- */
.hero-buttons {
    display: flex; /* لوضع الأزرار بجانب بعضها */
    gap: 20px; /* مسافة بين الزرين */
    margin-top: 40px; /* مسافة من النص الذي فوقه */
}

/* --- Secondary Button Style (for CV) --- */
.cta-button.secondary {
    background-color: transparent; /* خلفية شفافة */
    color: var(--sky-blue); /* لون النص لبني */
    border: 2px solid var(--sky-blue); /* إطار باللون اللبني */
}

.cta-button.secondary:hover {
    background-color: var(--sky-blue-tint); /* لون لبني شفاف عند الوقوف عليه */
    color: var(--sky-blue);
}