/* ===============================
   Reset & Variables
=============================== */

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

:root {
    --bg: #171717;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.7);
    --muted-2: rgba(255, 255, 255, 0.6);
    --line: rgba(255, 255, 255, 0.6);
    --container: 1120px;
    --accent: #00ADB5;
    --accent-hover: #00acb4;
}

html,
body {
    height: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
}


/* ===============================
   Header & Navigation (Responsive)
=============================== */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    pointer-events: none;
    background: rgba(23, 23, 23, 0.75);
    /* نفس درجة الـ --bg (#171717) مع شفافية 75% */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* لدعم متصفحات سفاري */
}

.site-header .nav {
    list-style: none;
    display: flex;
    gap: 32px;
    justify-content: center;
    padding: 24px 32px;
    flex-wrap: wrap;
    /* إضافة مهمة لعدم خروج العناصر من الشاشة */
}

.site-header a {
    pointer-events: auto;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.site-header a.active,
.site-header a:hover {
    color: #fff;
}


/* تعديلات الناف بار للموبايل */

@media (max-width: 768px) {
    .site-header .nav {
        gap: 15px;
        padding: 15px;
    }
    .site-header a {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .site-header .nav {
        gap: 10px;
        padding: 10px;
    }
    .site-header a {
        font-size: 10px;
    }
}


/* ===============================
   Dots Pagination
=============================== */

.dots {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 50;
}

.dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dots button.active {
    background: var(--accent);
    transform: scale(1.2);
}


/* ===============================
   Panels
=============================== */

.snap {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}

.panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    /* تعديل من grid لمنع قص المحتوى */
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    padding: 0 24px;
    background: radial-gradient(1200px 600px at 20% 10%, rgba(255, 255, 255, .08), transparent 70%), radial-gradient(1000px 500px at 80% 90%, rgba(255, 255, 255, .06), transparent 60%), var(--bg);
}

.container {
    width: 100%;
    max-width: var(--container);
    padding: 100px 0 60px;
    /* إضافة مسافة سفلية لحماية المحتوى من نقاط التنقل */
    margin: 0 auto;
}

.center {
    text-align: center;
}


/* ===============================
   Titles with Underline
=============================== */

.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 40px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(28px, 4vw, 40px);
    color: #fff;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 120px;
}


/* ===============================
   Hero Section
=============================== */

.hero-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    color: #fff;
    background: linear-gradient(to right, #0f2027, #000000, #000000);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1.5s ease forwards;
    padding: 0 20px;
    /* ضمان عدم التصاق النص بالشاشة في الموبايل */
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
}


/*
----------------------------
*/


/* تنسيق الحاوية عشان الزرارين يكونوا جنب بعض في النص */

.hero-action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    /* المسافة بين الزرارين */
    margin-top: 30px;
}


/* التنسيق الأساسي للزراير */

.hero-action-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* المسافة بين الكلام والأيقونة */
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    /* عشان يدي شكل الـ Pill */
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}


/* زرار Hire Me (اللون المائي) */

.hero-action-buttons .btn-primary {
    background-color: #00c2cb;
    /* تقدر تعدل درجة اللون حسب درجتك بالظبط */
    color: #ffffff;
    border: 2px solid #00c2cb;
}

.hero-action-buttons .btn-primary:hover {
    background-color: #009aa2;
    border-color: #009aa2;
    transform: translateY(-2px);
}


/* زرار Download CV (اللون الرمادي الغامق) */

.hero-action-buttons .btn-secondary {
    background-color: #2b2b2b;
    color: #ffffff;
    border: 2px solid #2b2b2b;
}

.hero-action-buttons .btn-secondary:hover {
    background-color: #3b3b3b;
    border-color: #3b3b3b;
    transform: translateY(-2px);
}


/*----------------------------
*/

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 30px;
}

.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===============================
   About
=============================== */

.about-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
    align-items: center;
}

.avatar {
    width: 200px;
    /* تصغير طفيف للموبايل */
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 320px 1fr;
    }
    .avatar {
        width: 280px;
        height: 280px;
    }
}

.lead {
    color: var(--muted);
    line-height: 1.8;
}


/* ===============================
   Education + Training + Courses
=============================== */

.edu-courses-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .edu-courses-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.info-card {
    background: #1f1f1f;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 173, 181, 0.6);
}

.edu-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.edu-meta {
    font-size: 0.95rem;
    color: var(--muted-2);
    margin-top: 8px;
}


/* Training List */

.training-list {
    list-style: none;
    color: var(--muted);
}

.training-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    text-align: left;
    /* ضمان محاذاة النص لليسار */
}

.training-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1rem;
}


/* Courses Grid */

.courses-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
    grid-template-columns: 1fr;
    /* إضافة الكولم الافتراضي للموبايل */
}

@media (min-width: 600px) {
    .courses-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.course-card {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.course-card:hover {
    background: #333;
    transform: translateY(-5px);
}

.course-card h3 {
    color: var(--accent);
    margin-bottom: 10px;
}

.course-card ul {
    list-style: none;
    text-align: left;
    /* ضمان محاذاة النص لليسار */
}

.course-card ul li {
    padding-left: 18px;
    margin-bottom: 8px;
    color: var(--muted);
    position: relative;
}

.course-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}


/* ===============================
   Work Experience
=============================== */

#experience {
    text-align: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* المسافة بين النص والأيقونة */
    text-decoration: none;
    /* لو حابب تشيل الخط اللي تحت اللينك */
    color: inherit;
    /* بياخد نفس لون النص الأصلي */
}

.link-icon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    /* تقليل وضوح الأيقونة شوية عشان تكون هادية */
    transition: transform 0.3s ease;
    /* تأثير حركة ناعم */
}


/* تأثير بسيط لما الماوس ييجي على اللينك */

.project-link:hover .link-icon {
    transform: translate(2px, -2px);
    /* الأيقونة بتتحرك لفوق ويمين شوية */
    opacity: 1;
}

.work-cards {
    display: grid;
    gap: 20px;
    padding: 20px 0;
    /* تعديل مسافات البادينج */
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .work-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.work-card {
    background: #1f1f1f;
    border-radius: 15px;
    padding: 20px;
    /* تم إزالة margin-right: 100px; لأنه كان يكسر التصميم على الموبايل */
    display: flex;
    flex-direction: column;
    /* لتنسيق أفضل في الشاشات الصغيرة */
    gap: 15px;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 600px) {
    .work-card {
        flex-direction: row;
        /* إعادة العناصر جانب بعض في الشاشات الأكبر */
        align-items: flex-start;
        text-align: left;
    }
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 173, 181, 0.6);
}

.work-icon i {
    font-size: 2rem;
    color: var(--accent);
}

.work-info h3 {
    color: #fff;
    margin-bottom: 5px;
}

.work-role {
    font-size: 0.95rem;
    color: var(--accent-hover);
    margin-bottom: 5px;
}

.work-details {
    font-size: 0.9rem;
    color: var(--muted);
}


/* ===============================
   Our Services
=============================== */

#my-work {
    padding: 100px 20px;
    background: linear-gradient(135deg, #0f0f0f, #1e1e1e);
    color: #fff;
    text-align: center;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: auto;
    width: 100%;
}

.service-card {
    background: #1f1f1f;
    padding: 60px 20px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
}

.service-card p {
    padding: 15px 0;
    /* تعديل البادينج */
    color: var(--muted);
}

.service-card.show {
    opacity: 1;
    transform: translateY(0);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px rgba(0, 173, 181, 0.6);
}


/* ===============================
   Gallery
=============================== */

.gallery-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card figcaption {
    text-align: center;
    margin-top: 10px;
    color: var(--muted);
}

.card figcaption a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card figcaption a:hover {
    color: var(--accent);
    /* تغيير للون المتغير الرئيسي */
}


/* ===============================
   Contact
=============================== */

.contact-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 30px;
}

.contact-card {
    background: #1f1f1f;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 173, 181, 0.6);
}

.contact-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.contact-card a {
    color: var(--muted);
    text-decoration: none;
    word-break: break-all;
    /* لمنع الإيميلات الطويلة من كسر الموبايل */
}

.contact-card a:hover {
    color: var(--accent-hover);
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    font-size: 14px;
    border-top: 1px solid #444;
    color: #bbb;
}


/* Chrome, Edge, Safari */

::-webkit-scrollbar {
    display: none;
}


/* Firefox */

html {
    scrollbar-width: none;
}
