@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   1. GLOBAL
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #fff;
    color: #333;
}

/* ==========================================================================
   2. SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
    width: 190px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #fff;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.profile-block {
    padding: 35px 20px;
    text-align: center;
    border-bottom: 1px solid #f9f9f9;
}

.profile-block img {
    width: 65px;
    height: 65px;
    border-radius: 6px;
    background-color: #eee;
    margin-bottom: 12px;
    object-fit: cover;
}

.profile-block h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin: 0;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    border-bottom: 1px solid #f8f8f8;
}

.nav-links li a {
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    display: block;
    padding: 16px 20px;
    text-align: center;
    transition: 0.3s;
    position: relative;
    font-weight: 500;
}

.nav-links li a.active {
    color: #007bff;
    font-weight: 600;
}

.nav-links li a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: #007bff;
}

.nav-links li a:hover {
    color: #007bff;
}

.sidebar-footer {
    margin-top: auto;
    padding-bottom: 25px;
    text-align: center;
}

.social-icons {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.social-icons a {
    background-color: #f1f5f9;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
    border-radius: 3px;
    transition: 0.3s;
}

.social-icons a:hover {
    background-color: #007bff;
    color: #fff;
}

.copyright {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.5;
}

/* ==========================================================================
   3. MAIN CONTENT
   ========================================================================== */
.main-content {
    margin-left: 190px;
    padding: 50px 60px;
    width: calc(100% - 190px);
    max-width: 1400px;
    box-sizing: border-box;
}

/* ==========================================================================
   4. COMMON TITLES / BUTTONS / GRIDS
   ========================================================================== */
.what-i-do-title,
.resume-sub-title,
.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 35px;
    color: #0f172a;
}

.what-i-do-title span,
.resume-sub-title span,
.section-title span {
    border-bottom: 3px solid #007bff;
    padding-bottom: 6px;
}

.cv-btn {
    display: inline-block;
    padding: 12px 32px;
    border: 2px solid #e2e8f0;
    color: #1e293b;
    text-decoration: none;
    font-size: 13.5px;
    border-radius: 5px;
    transition: 0.3s;
    background: #fff;
    box-sizing: border-box;
    font-weight: 600;
}

.cv-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.cv-btn-primary {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.cv-btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: #fff;
}

.services-grid,
.resume-container,
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* ==========================================================================
   5. HOME PAGE / HERO (HIGH VISIBILITY & CONTRAST)
   ========================================================================== */
.hero-content-home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin-top: 10px;
    margin-bottom: 60px;
    max-width: 100%;
}

.hero-text {
    flex: 1 1 65%;
}

.hero-image-wrapper {
    flex: 0 0 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-profile-img {
    width: 260px;
    height: 310px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #f8fafc;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.hero-badge {
    color: #007bff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    display: block;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px 0;
    line-height: 1.1;
}

.hero-subline {
    font-size: 15px;
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.6;
    letter-spacing: 0.2px;
    font-weight: 600;
}

.hero-description {
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 30px;
    max-width: 850px;
}

.hero-description strong {
    color: #0f172a;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.what-i-do-section,
.certifications-section,
.expertise-section {
    margin-top: 55px;
}

.service-item {
    background: #fff;
}

.service-icon-box {
    font-size: 24px;
    color: #007bff;
    margin-bottom: 12px;
}

.service-item h4 {
    font-size: 17px;
    color: #0f172a;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.service-item p {
    color: #475569;
    font-size: 14px;
    line-height: 1.75;
    margin: 0;
}

/* ==========================================================================
   5.1 OFFICIAL CERTIFICATIONS & SKILLS TAGS (CONTRAST FIX)
   ========================================================================== */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.cert-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cert-badge-icon {
    font-size: 2.4rem;
    color: #0073b1;
    line-height: 1;
}

.cert-details h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.cert-issuer {
    font-size: 13.5px;
    color: #475569;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.cert-id {
    display: inline-block;
    font-size: 12.5px;
    font-family: Consolas, monospace;
    color: #0f172a;
    margin-bottom: 12px;
    word-break: break-all;
    background: #f1f5f9;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    line-height: 1.5;
}

.verify-link {
    font-size: 13.5px;
    color: #0073b1;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    transition: 0.2s ease;
}

.verify-link:hover {
    background: #0073b1;
    color: #ffffff;
    border-color: #0073b1;
}

.skills-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill-tag {
    background: #f1f5f9;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    display: inline-block;
    transition: 0.2s ease;
}

.skill-tag:hover {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.home-cta-box {
    margin-top: 60px;
    padding: 35px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.home-cta-box h3 {
    margin: 0 0 10px 0;
    font-size: 21px;
    color: #0f172a;
}

.home-cta-box p {
    margin: 0 0 20px 0;
    color: #475569;
    font-size: 15px;
}

/* ==========================================================================
   6. RESUME SECTION
   ========================================================================== */
.timeline {
    border-left: 1px solid #f0f0f0;
    padding-left: 20px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 50%;
}

.timeline-date {
    font-size: 12px;
    color: #bbb;
    margin-bottom: 5px;
}

.timeline-content h5 {
    font-size: 16px;
    margin: 0;
    color: #333;
}

.timeline-content .institution {
    font-size: 13px;
    color: #007bff;
    margin: 5px 0;
}

.timeline-content p {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.7;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: #333;
}

.skill-info span:first-child {
    color: #333;
    font-weight: 500;
}

.skill-info span:last-child {
    color: #888;
}

.skill-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
}

.skill-progress {
    height: 100%;
    background: #007bff;
    border-radius: 2px;
    transition: width 1s ease-in-out;
}

.exp-list {
    padding-left: 18px;
    margin-top: 10px;
}

.exp-list li {
    font-size: 13.5px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* ==========================================================================
   7. PORTFOLIO SECTION
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.portfolio-item {
    cursor: pointer;
}

.portfolio-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: #fcfcfc;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.portfolio-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #007bff;
    color: #fff;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 3px;
    z-index: 2;
}

.portfolio-info {
    padding: 15px 0;
}

.portfolio-info span {
    display: block;
    color: #bbb;
    font-size: 12px;
    margin-bottom: 5px;
}

.portfolio-info h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.portfolio-item:hover .portfolio-thumbnail {
    border-color: #007bff;
    transition: 0.3s;
}

/* ==========================================================================
   8. PROJECT DETAIL PAGE
   ========================================================================== */
.project-detail-container {
    padding: 10px 0;
    animation: fadeIn 0.5s ease-in-out;
}

.project-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.project-title {
    font-size: clamp(24px, 5vw, 34px);
    color: #222;
    font-weight: 800;
    margin-bottom: 12px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.project-meta span i {
    color: #007db8;
    margin-right: 5px;
}

.project-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.project-main {
    flex: 2;
}

.project-main h4 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.project-description {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.project-sidebar {
    flex: 1;
    background: #fcfcfc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    position: sticky;
    top: 20px;
}

.project-sidebar h5 {
    font-size: 18px;
    color: #222;
    margin-bottom: 20px;
    font-weight: 700;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    background: #007db8;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.tech-tags span:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.nda-alert {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding: 20px;
    background: #fff9e6;
    border-left: 5px solid #ffcc00;
    border-radius: 4px;
    color: #856404;
    font-weight: 500;
}

.back-btn {
    margin-top: 20px;
    transition: 0.3s;
    font-weight: bold;
}

.back-btn:hover {
    background: #007db8 !important;
    transform: translateX(-5px);
}

/* ==========================================================================
   9. BLOG & CONTACT SECTIONS
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.blog-post-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    transition: 0.3s;
}

.blog-post-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.post-content {
    padding: 20px;
}

.contact-card {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    padding: 40px;
    border-radius: 6px;
}

/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 40px 20px;
    }

    .portfolio-grid,
    .services-grid,
    .resume-container,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-content-home {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 30px;
        margin-top: 0;
        margin-bottom: 40px;
    }

    .hero-image-wrapper {
        width: 100%;
        justify-content: flex-start;
    }

    .hero-profile-img {
        width: 200px;
        height: 240px;
    }

    .hero-title {
        font-size: 40px;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .sidebar-footer {
        display: none;
    }

    .project-layout {
        flex-direction: column;
    }

    .project-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .cv-btn {
        width: 100%;
        text-align: center;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
-------------------------------------------------------

.hero-image-card {
    width: 260px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.hero-image-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    image-rendering: auto;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ضبط الصورة الصغيرة في القائمة الجانبية */
.sidebar-profile img, 
.sidebar img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    image-rendering: auto;
}
