
/* =====================================
   إعدادات عامة
===================================== */

:root {
    --primary: #102b46;
    --secondary: #176b87;
    --accent: #39a6b9;
    --light: #eaf4f7;
    --background: #f5f8fb;
    --white: #ffffff;
    --text: #25364a;
    --muted: #728196;
    --border: #e3eaf0;
    --shadow: 0 8px 30px rgba(16, 43, 70, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--background);
    color: var(--text);
    direction: rtl;
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.page-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: 25px;
}

/* =====================================
   شريط الأدوات
===================================== */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
}

.brand-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--primary);
    color: var(--white);
    font-size: 19px;
    direction: ltr;
}

.print-button {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    transition: 0.3s;
}

.print-button:hover {
    background: var(--primary);
    color: var(--white);
}

/* =====================================
   القسم الرئيسي
===================================== */

.hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 320px;
    overflow: hidden;
    padding: 55px 60px;
    border-radius: 20px;
    background: linear-gradient(120deg, #102b46, #15516a, #176b87);
    color: var(--white);
    box-shadow: var(--shadow);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #9edbe3;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin-bottom: 5px;
    font-size: clamp(30px, 5vw, 43px);
    font-weight: 900;
    line-height: 1.5;
}

.hero h2 {
    margin-bottom: 18px;
    color: #b5e4e9;
    font-size: 19px;
    font-weight: 600;
}

.hero-description {
    max-width: 580px;
    color: #e2edf2;
    font-size: 14px;
    line-height: 2.1;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.hero-tags span {
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    font-size: 11px;
}

/* الزخارف */

.hero-decoration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 230px;
    min-width: 200px;
    height: 230px;
}

.hero-letter {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 130px;
    height: 130px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 35px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 80px;
    font-weight: 900;
    direction: ltr;
    backdrop-filter: blur(5px);
}

.circle {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
}

.circle-one {
    width: 205px;
    height: 205px;
}

.circle-two {
    width: 245px;
    height: 245px;
}

.decoration-caption {
    position: absolute;
    bottom: -8px;
    color: #b5e4e9;
    font-size: 10px;
    letter-spacing: 5px;
    direction: ltr;
}

/* =====================================
   الأقسام العامة
===================================== */

.section {
    margin-top: 38px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.section-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--light);
    color: var(--secondary);
    font-size: 12px;
    font-weight: 800;
    direction: ltr;
}

.section-heading h2 {
    color: var(--primary);
    font-size: 21px;
    font-weight: 800;
}

/* =====================================
   النبذة التعريفية
===================================== */

.about-text {
    padding: 22px 25px;
    border-right: 4px solid var(--accent);
    border-radius: 10px;
    background: var(--white);
    color: #5c6d80;
    font-size: 14px;
    line-height: 2.2;
    box-shadow: var(--shadow);
}

/* =====================================
   المهارات
===================================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.skill-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--white);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border-radius: 11px;
    background: var(--light);
    color: var(--secondary);
    font-size: 14px;
    font-weight: 900;
    direction: ltr;
}

.skill-card h3 {
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.skill-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

/* =====================================
   المشاريع
===================================== */

.projects-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
}

.project-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--white);
    transition: 0.3s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.project-index {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 800;
    direction: ltr;
}

.project-card h3 {
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.project-card p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.9;
}

/* =====================================
   التعليم
===================================== */

.education-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.education-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 15px;
    background: var(--light);
    font-size: 29px;
}

.education-status {
    display: inline-block;
    margin-bottom: 5px;
    color: #16846e;
    font-size: 11px;
    font-weight: 800;
}

.education-content h3 {
    color: var(--primary);
    font-size: 17px;
    font-weight: 800;
}

.education-content > p {
    color: var(--muted);
    font-size: 13px;
}

.education-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.education-details span {
    padding: 5px 10px;
    border-radius: 7px;
    background: var(--background);
    color: var(--secondary);
    font-size: 11px;
    font-weight: 700;
}

.languages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
    margin-top: 14px;
}

.language-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 17px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    font-size: 12px;
}

.language-item span {
    color: var(--text);
    font-weight: 700;
}

.language-item strong {
    color: var(--secondary);
}

/* =====================================
   التواصل
===================================== */

.contact-section {
    margin-top: 45px;
    padding: 38px 35px;
    border-radius: 18px;
    background: linear-gradient(120deg, #102b46, #15516a);
    color: white;
    text-align: center;
}

.contact-eyebrow {
    color: #9edbe3;
    font-size: 12px;
    font-weight: 700;
}

.contact-section h2 {
    margin: 8px 0;
    font-size: 27px;
    font-weight: 900;
}

.contact-section > p {
    color: #d2e5eb;
    font-size: 13px;
}

.contact-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
    padding: 12px 17px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    text-align: right;
    transition: 0.3s;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.16);
}

.contact-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 18px;
}

.contact-item small,
.contact-item strong {
    display: block;
}

.contact-item small {
    color: #b7d9e0;
    font-size: 10px;
}

.contact-item strong {
    color: white;
    font-size: 12px;
    direction: ltr;
    unicode-bidi: embed;
}

.whatsapp-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    padding: 14px 25px;
    border-radius: 10px;
    background: #20bd68;
    color: white;
    font-size: 14px;
    font-weight: 800;
    transition: 0.3s;
}

.whatsapp-button:hover {
    background: #159c53;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(32, 189, 104, 0.25);
}

.whatsapp-button svg {
    width: 22px;
    height: 22px;
}

.closing-message {
    max-width: 600px;
    margin: 25px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: #c8e0e7;
    font-size: 12px;
}

/* =====================================
   التذييل
===================================== */

.footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 22px 5px 5px;
    color: var(--muted);
    font-size: 11px;
}

.footer span {
    direction: ltr;
}

/* =====================================
   التجاوب مع الجوال
===================================== */

@media (max-width: 768px) {

    .page-wrapper {
        padding: 15px;
    }

    .hero {
        min-height: auto;
        padding: 35px 25px;
    }

    .hero-decoration {
        display: none;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero h2 {
        font-size: 16px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-list {
        grid-template-columns: 1fr;
    }

    .contact-section {
        padding: 30px 18px;
    }

}

@media (max-width: 480px) {

    .top-bar {
        gap: 8px;
    }

    .brand {
        font-size: 13px;
    }

    .print-button {
        padding: 8px 10px;
        font-size: 10px;
    }

    .hero {
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-description {
        font-size: 12px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .section-heading h2 {
        font-size: 18px;
    }

    .about-text {
        padding: 18px;
        font-size: 12px;
    }

    .education-card {
        align-items: flex-start;
        padding: 17px;
    }

    .education-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .education-content h3 {
        font-size: 14px;
    }

    .languages {
        grid-template-columns: 1fr;
    }

    .contact-section h2 {
        font-size: 22px;
    }

    .contact-item {
        width: 100%;
        min-width: 0;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }

}

/* =====================================
   إعدادات الطباعة وحفظ PDF
===================================== */

@media print {

    @page {
        size: A4;
        margin: 8mm;
    }

    body {
        background: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .page-wrapper {
        max-width: 100%;
        padding: 0;
    }

    .top-bar {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 25px 35px;
        border-radius: 8px;
    }

    .hero-decoration {
        transform: scale(0.75);
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero h2 {
        font-size: 14px;
    }

    .hero-description {
        font-size: 11px;
    }

    .section {
        margin-top: 18px;
        break-inside: avoid;
    }

    .section-heading {
        margin-bottom: 10px;
    }

    .section-heading h2 {
        font-size: 16px;
    }

    .about-text {
        padding: 12px 16px;
        font-size: 10px;
        line-height: 1.9;
    }

    .skills-grid {
        gap: 8px;
    }

    .skill-card {
        padding: 11px;
    }

    .skill-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 5px;
    }

    .skill-card h3 {
        font-size: 11px;
    }

    .skill-card p {
        font-size: 9px;
    }

    .projects-list {
        gap: 8px;
    }

    .project-card {
        padding: 10px;
        gap: 9px;
    }

    .project-card h3 {
        font-size: 10px;
    }

    .project-card p {
        font-size: 9px;
    }

    .education-card {
        padding: 13px;
    }

    .education-content h3 {
        font-size: 13px;
    }

    .education-content > p,
    .education-details span {
        font-size: 10px;
    }

    .languages {
        gap: 8px;
    }

    .language-item {
        padding: 8px 12px;
    }

    .contact-section {
        margin-top: 20px;
        padding: 18px;
        border-radius: 8px;
        break-inside: avoid;
    }

    .contact-section h2 {
        font-size: 20px;
    }

    .contact-section > p {
        font-size: 10px;
    }

    .contact-details {
        margin: 12px 0;
    }

    .contact-item {
        padding: 8px 12px;
    }

    .whatsapp-button {
        padding: 9px 20px;
    }

    .closing-message {
        margin-top: 12px;
        padding-top: 10px;
        font-size: 10px;
    }

    .footer {
        padding-top: 10px;
        font-size: 9px;
    }

    .skill-card,
    .project-card,
    .education-card,
    .about-text,
    .language-item {
        break-inside: avoid;
    }

    a {
        text-decoration: none;
    }

}
