/* ==================== VARIABLES ==================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #e8e8ed;
    --text-secondary: #9999a8;
    --accent: #4fc3f7;
    --accent-dark: #0288d1;
    --accent-gradient: linear-gradient(135deg, #4fc3f7, #0288d1);
    --border: rgba(255, 255, 255, 0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --transition: 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: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

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

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

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

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-gradient);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 195, 247, 0.3);
    color: #000;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    background: var(--accent-gradient);
    color: #000;
}

.btn-sm:hover {
    color: #000;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #000;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: transparent;
    transition: all var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    width: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    flex-shrink: 0;
}

.nav-logo:hover {
    color: var(--accent);
}

.logo-img {
    height: 65px;
    width: 65px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

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

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

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

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(79, 195, 247, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-photo {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 24px;
    border: 3px solid var(--border);
    box-shadow: 0 0 40px rgba(79, 195, 247, 0.15);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-name-ar {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 400;
}

.hero-contact {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
}

.hero-contact a {
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: all var(--transition);
}

.hero-contact a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* ==================== ABOUT ==================== */
.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

/* ==================== EDUCATION ==================== */
.education-grid {
    display: grid;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
}

.edu-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.edu-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.org-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.edu-card-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.edu-degree {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.edu-dates {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.edu-dates i {
    margin-right: 6px;
}

.edu-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.edu-details li {
    list-style: disc inside;
    margin-left: 0;
    padding-left: 0;
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

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

.project-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex-grow: 1;
}

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

.tag {
    background: rgba(79, 195, 247, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links a:hover {
    color: var(--accent);
}

.project-links i {
    margin-right: 4px;
}

/* ==================== EXPERIENCE ==================== */
.timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-left: 32px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.4);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
}

.timeline-content:hover {
    background: var(--bg-card-hover);
}

.exp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.exp-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.exp-company {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.exp-dates {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.exp-dates i {
    margin-right: 6px;
}

.exp-responsibilities {
    padding-left: 18px;
    list-style: disc;
}

.exp-responsibilities li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
    list-style: disc;
}

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

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all var(--transition);
}

.cert-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.cert-badge {
    flex-shrink: 0;
}

.cert-badge img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: contain;
}

.cert-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cert-org {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.cert-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.cert-date i {
    margin-right: 6px;
}

.cert-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.skill-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent);
}

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

.skill-tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
}

.skill-tag:hover {
    background: rgba(79, 195, 247, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* ==================== LANGUAGES ==================== */
.languages-grid {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.language-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.language-name {
    font-weight: 600;
    font-size: 1rem;
}

.language-level {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}

.language-bar {
    grid-column: 1 / -1;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
}

.language-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 1s ease;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition);
}

.footer-social a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        transform: none;
        width: 200px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        transition: right var(--transition);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-photo {
        width: 140px;
        height: 140px;
    }

    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 36px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .certs-grid {
        grid-template-columns: 1fr;
    }

    .cert-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cert-links {
        justify-content: center;
    }

    .skills-container {
        grid-template-columns: 1fr 1fr;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-dot {
        left: -29px;
    }
}

@media (max-width: 480px) {
    .skills-container {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: 1.8rem;
    }
}
