/* CSS Variables for easier theme management */
:root {
    --primary-color: #20c997; /* Teal/Green from image */
    --secondary-color: #343a40; /* Dark text color */
    --light-bg: #f8f9fa; /* Light background for left panel */
    --text-color-light: #6c757d; /* Lighter text color */
    --white: #ffffff;
    --font-family: 'Poppins', sans-serif; /* Using Poppins from Google Fonts */
    --section-bg: #ffffff; /* Background for content sections */
    --border-color: #e9ecef; /* Light border for separation */
}

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

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--light-bg);
    overflow-x: hidden; /* Prevent horizontal scroll due to clip-path */
}

.wrapper {
    display: flex;
    min-height: 100vh; /* Full viewport height */
    position: relative;
}

/* Social Links Aside */
.social-links {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* Ensure it's on top */
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    padding: 10px 5px;
    border-radius: 0 5px 5px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.social-links ul {
    list-style: none;
}

.social-links ul li {
    margin-bottom: 10px;
}

.social-links ul li a {
    color: var(--secondary-color);
    font-size: 1.2em;
    padding: 5px;
    display: block;
    transition: color 0.3s ease;
}

.social-links ul li a:hover {
    color: var(--primary-color);
}

/* Left Panel - Content Area */
.left-panel {
    flex: 1; /* Takes up available space */
    background-color: var(--light-bg);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content */
    align-items: flex-start; /* Align content to the left */
    position: relative;
    z-index: 2; /* Ensure it's above the right panel's background */
}

.main-header {
    position: absolute; /* Position logo independently */
    top: 40px;
    left: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--secondary-color);
}

.hero-content {
    max-width: 550px; /* Limit width for readability */
    margin-left: auto; /* Center within the left-panel if it's narrower than max-width */
    margin-right: auto;
    text-align: left;
}

.hero-content .greeting {
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-content .name {
    font-size: 3.5em;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-content .title {
    font-size: 1.5em;
    font-weight: 500;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.hero-content .description {
    font-size: 1em;
    color: var(--text-color-light);
    margin-bottom: 30px;
}

/* Hero Action Buttons Container */
.hero-actions {
    display: flex; /* Arrange buttons side-by-side */
    gap: 15px; /* Space between buttons */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.btn-action {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-action:hover {
    background-color: #1a9c78; /* A slightly darker shade of primary-color */
    transform: translateY(-2px);
}

/* Specific styling for a secondary action button */
.btn-secondary-action {
    background-color: var(--secondary-color); /* Use a darker color to differentiate */
}

.btn-secondary-action:hover {
    background-color: #23272b; /* Darker shade on hover */
}


/* Right Panel - Image and Navigation */
.right-panel {
    flex: 1; /* Takes up available space */
    background-color: var(--primary-color);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center image vertically */
    align-items: center; /* Center image horizontally */
    overflow: hidden; /* Hide parts of the image that go beyond clip-path */

    /* Diagonal split using clip-path */
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%); /* Adjust the 15% to control diagonal angle */
    -webkit-clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%); /* For browser compatibility */
}

.main-nav {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 5; /* Ensure navigation is on top */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px; /* Space between navigation items */
}

.main-nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    padding-bottom: 5px;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: width 0.3s ease;
}

.main-nav ul li a.active::after, /* Active state */
.main-nav ul li a:hover::after { /* Hover state */
    width: 100%;
}

.hero-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 650px;   /* عرض ثابت */
    height: 650px; 
     position: relative;
    top: 60px;
    left: 15px; /* ارتفاع ثابت */
    object-fit: cover;
    border-radius: 8px;
}


/* --- NEW RESUME SECTION STYLES --- */
.portfolio-section {
    padding: 80px 0; /* Vertical padding for sections */
    background-color: var(--section-bg);
    text-align: center; /* Center section header by default */
}

.section-container {
    max-width: 1200px; /* Max width for content */
    margin: 0 auto;
    padding: 0 20px; /* Horizontal padding */
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block; /* For underline effect */
}

.section-header h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2em;
    color: var(--text-color-light);
    max-width: 700px;
    margin: 0 auto;
}

.resume-section {
    background-color: var(--light-bg); /* Slightly different background for resume section */
}

.resume-grid {
    display: flex;
    gap: 40px;
    margin-bottom: 40px; /* Space before skills/projects */
    text-align: left; /* Align text within resume items to left */
}

.resume-column {
    flex: 1;
}

.resume-column h3, .resume-full-width h3 {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.resume-column h3 i, .resume-full-width h3 i {
    color: var(--primary-color);
    font-size: 0.8em; /* Smaller icon */
}

.resume-item-content {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--white);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 5px;
}

.resume-item-content p {
    font-size: 0.95em;
    margin-bottom: 10px;
}

.job-entry, .edu-entry {
    margin-bottom: 25px;
}

.job-entry:last-of-type, .edu-entry:last-of-type {
    margin-bottom: 0;
}

.job-entry h4, .edu-entry h4 {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

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

.job-meta, .edu-meta {
    font-size: 0.9em;
    color: var(--text-color-light);
    margin-bottom: 10px;
    display: block;
}

.job-entry ul, .edu-entry ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
    margin-top: 10px;
}

.job-entry ul li, .edu-entry ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--secondary-color);
}

.job-entry ul li::before, .edu-entry ul li::before {
    content: '\2022'; /* Unicode bullet point */
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    text-align: left;
}

.skill-tag {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap; /* Prevent tags from breaking */
}

/* Projects in Resume */
.project-list {
    margin-top: 20px;
    text-align: left;
}

.project-entry-resume {
    background-color: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 5px;
}

.project-entry-resume h4 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.project-entry-resume .project-meta {
    font-size: 0.85em;
    color: var(--text-color-light);
    margin-bottom: 10px;
}

.project-entry-resume p {
    font-size: 0.95em;
    margin-bottom: 15px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
}

.project-link i {
    margin-right: 5px;
}


/* --- CONTACT SECTION STYLES (Basic placeholder) --- */
.contact-section {
    background-color: var(--white);
    padding-bottom: 100px; /* Extra padding for last section */
}

.contact-form-placeholder {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.contact-form-placeholder p {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.contact-form-placeholder a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-form-placeholder a:hover {
    text-decoration: underline;
}


/* Responsive Design */
@media (max-width: 992px) {
    .wrapper {
        flex-direction: column; /* Stack panels vertically */
    }

    .social-links {
        position: static; /* Remove fixed positioning */
        transform: none;
        display: flex;
        justify-content: center;
        background-color: var(--light-bg);
        padding: 15px 0;
        border-radius: 0;
        box-shadow: none;
        order: -1; /* Place social links at the top on small screens */
    }

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

    .social-links ul li {
        margin-bottom: 0;
    }

    .left-panel, .right-panel {
        flex: none; /* Reset flex grow */
        width: 100%;
        padding: 30px 20px;
        clip-path: none; /* Remove diagonal split on smaller screens */
        -webkit-clip-path: none;
        text-align: center; /* Center content on smaller screens */
    }

    .main-header {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }

    .logo {
        margin-bottom: 20px; /* Add space below logo */
    }

    .main-nav {
        position: static;
        margin-bottom: 30px;
        width: 100%;
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap; /* Allow navigation items to wrap */
        gap: 15px;
    }

    .hero-content {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-content .name {
        font-size: 2.5em;
    }

    .hero-content .title {
        font-size: 1.2em;
    }

    /* Adjust button layout for smaller screens */
    .hero-actions {
        justify-content: center; /* Center buttons when stacked */
    }
    .btn-action {
        width: 100%; /* Make buttons full width on small screens */
        max-width: 250px; /* Limit width even if full width */
    }

    .hero-image {
        max-width: 90%;
        max-height: 400px; /* Limit height for mobile */
    }

    /* Resume Section Responsiveness */
    .portfolio-section {
        padding: 60px 0;
    }
    .section-header h2 {
        font-size: 2.2em;
    }
    .resume-grid {
        flex-direction: column; /* Stack resume columns vertically */
        gap: 30px;
    }
    .resume-column h3, .resume-full-width h3 {
        justify-content: center; /* Center section headers */
        border-bottom: none; /* Remove border for cleaner look */
        padding-bottom: 0;
    }
    .resume-item-content, .project-entry-resume {
        border-left: none; /* Remove left border on small screens */
        border-top: 4px solid var(--primary-color); /* Add top border instead */
    }
    .skills-grid {
        justify-content: center; /* Center skill tags */
    }
}

@media (max-width: 576px) {
    .hero-content .name {
        font-size: 2em;
    }

    .hero-content .title {
        font-size: 1em;
    }

    .btn-action {
        padding: 12px 25px;
        font-size: 1em;
    }

    .main-nav ul {
        flex-direction: column; /* Stack nav items vertically on very small screens */
        align-items: center;
    }

    .section-header h2 {
        font-size: 1.8em;
    }
    .section-header p {
        font-size: 1em;
    }
    .resume-item-content {
        padding: 15px;
    }
    .job-entry h4, .edu-entry h4 {
        font-size: 1.1em;
    }
    .job-entry ul li, .edu-entry ul li, .project-entry-resume p {
        font-size: 0.85em;
    }
    .skill-tag {
        font-size: 0.8em;
        padding: 6px 12px;
    }
}