/* ===== VARIABLES ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray: #64748b;
    --gray-light: #f1f5f9;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }

img { max-width: 100%; }

/* ===== UTILITIES ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--gray-light);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 16px auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-full {
    width: 100%;
}

/* ===== NAVBAR ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: none;
    transition: var(--transition);
}

#navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-container {
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    color: var(--white);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 24px;
}

.hero-greeting {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.hero-socials {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-socials a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
}

.hero-socials a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ===== ABOUT ===== */
.about-text p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 48px;
    text-align: center;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

/* ===== TIMELINE (Education) ===== */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}

.timeline-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    z-index: 1;
}

.timeline-content {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex: 1;
}

.timeline-year {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--gray);
}

.timeline-content p i {
    margin-right: 6px;
    color: var(--primary);
}

/* ===== EXPERIENCE ===== */
.experience-grid {
    display: grid;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.experience-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.experience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.exp-role {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 500;
}

.exp-duration {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.exp-tasks {
    list-style: none;
}

.exp-tasks li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--gray);
}

.exp-tasks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: var(--primary);
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--gray-light);
    color: var(--gray);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.skill-category h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-category h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-badge:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.contact-item i {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.contact-item h4 {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 4px;
}

.contact-item a {
    font-weight: 600;
    color: var(--dark);
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-form .form-group {
    margin-bottom: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.contact-form textarea {
    resize: vertical;
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 28px 0;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        transition: var(--transition);
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-stats {
        flex-direction: column;
        gap: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section {
        padding: 70px 0;
    }

    .timeline::before {
        left: 24px;
    }
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESEARCH BLOCK ===== */
.research-block {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    border-radius: var(--radius);
    padding: 28px;
    margin: 32px auto 48px;
    max-width: 800px;
    border-left: 4px solid var(--primary);
}

[dir="rtl"] .research-block {
    border-left: none;
    border-right: 4px solid var(--primary);
}

.research-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
}

.research-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.research-block p {
    font-size: 0.92rem;
    color: var(--gray);
    line-height: 1.7;
    text-align: left;
}

[dir="rtl"] .research-block p {
    text-align: right;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.lang-flag {
    font-size: 1.4rem;
    line-height: 1;
    opacity: 0.45;
    transition: var(--transition);
    cursor: pointer;
    filter: grayscale(60%);
    padding: 4px;
}

.lang-flag:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.15);
}

.lang-flag.active {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.15);
    position: relative;
}

.lang-flag.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* ===== PROFESSIONAL PROJECTS ===== */
.projects-pro-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.project-pro-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.project-pro-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.project-pro-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.project-pro-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
}

.project-pro-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.project-pro-desc {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 24px;
}

.project-pro-features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.project-pro-features li {
    font-size: 0.9rem;
    color: var(--dark-2);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.project-pro-features li i {
    color: var(--primary);
    margin-top: 3px;
    font-size: 0.85rem;
    min-width: 16px;
}

.project-pro-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.project-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    transition: var(--transition);
}

.project-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}
