@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
    --bg: #e4eefb;
    --bg-alt: #d2e3f6;
    --card: #ffffff;
    --card-border: #c0d6ee;
    --gold: #3b6ea5;
    --gold-light: #5b93c9;
    --text: #1e2a38;
    --text-mute: #5c6b7a;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #eef4fb 45%, #dbe9f8 100%) fixed;
    color: var(--text);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── NAVBAR ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.navbar.scrolled {
    background: rgba(255,255,255,.95);
    border-bottom-color: var(--card-border);
    box-shadow: 0 4px 24px -10px rgba(59,110,165,.3);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    height: 68px;
    transition: height .3s ease;
}
.navbar.scrolled .container { height: 58px; }
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: .5px;
    flex-shrink: 0;
}
.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--gold), #2c5580);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 6px 16px -6px rgba(59,110,165,.55);
}
.nav-links {
    display: flex;
    gap: 28px;
    font-size: 14.5px;
    font-weight: 600;
}
.nav-links a { position: relative; padding-bottom: 4px; color: var(--text-mute); transition: color .2s; }
.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transition: left .25s ease, right .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-light); }
.nav-links a:hover::after, .nav-links a.active::after { left: 0; right: 0; }
.btn-cv {
    background: var(--gold);
    color: #ffffff;
    font-weight: 800;
    font-size: 13.5px;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.nav-toggle { display: none; background: none; border: none; color: var(--gold); font-size: 26px; cursor: pointer; flex-shrink: 0; }
.lang-toggle {
    background: none;
    border: 1.5px solid var(--card-border);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    transition: border-color .2s, color .2s;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* ── HERO ── */
.hero {
    padding: 64px 0 48px;
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(rgba(59,110,165,.16) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
}
.hero::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(59,110,165,.35), transparent 70%);
    top: -140px;
    left: -100px;
    animation: blobFloat1 13s ease-in-out infinite;
}
.hero::after {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(91,147,201,.32), transparent 70%);
    bottom: -160px;
    right: -120px;
    animation: blobFloat2 16s ease-in-out infinite;
}
@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.12); }
}
@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-35px, -25px) scale(1.08); }
}
.hero-spotlight {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 30%), rgba(59,110,165,.22), transparent 65%);
}
.hero .container {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.badge-hi {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-light);
    background: rgba(59,110,165,.1);
    border: 1px solid rgba(59,110,165,.3);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 18px;
}
.hero h1 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
    color: var(--gold);
}
.hero .role {
    font-size: 19px;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 16px;
}
.hero .bio {
    font-size: 15px;
    color: var(--text-mute);
    line-height: 1.9;
    max-width: 520px;
    margin-bottom: 26px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 26px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 9px;
    font-weight: 800;
    font-size: 14.5px;
    transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #ffffff; position: relative; overflow: hidden; }
.btn-primary::after, .btn-cv::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
    transform: skewX(-20deg);
    animation: shimmerSweep 3.5s ease-in-out infinite;
}
@keyframes shimmerSweep {
    0% { left: -60%; }
    45%, 100% { left: 130%; }
}
.btn-outline { border: 1.5px solid var(--card-border); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); }
.social-row { display: flex; gap: 12px; }
.social-row a {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    color: var(--text-mute);
    transition: all .2s;
}
.social-row a:hover { color: #ffffff; background: var(--gold); border-color: var(--gold); }

.hero-art {
    position: relative;
    height: 380px;
    border-radius: 22px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    animation: glowPulse 5s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 25px 60px -15px rgba(59,110,165,.4); }
    50% { box-shadow: 0 28px 75px -10px rgba(59,110,165,.6); }
}
.hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── STATS ── */
.stats-bar {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    margin: -24px auto 60px;
    max-width: 1400px;
    box-shadow: 0 10px 34px -16px rgba(59,110,165,.3);
    position: relative;
    z-index: 1;
}
.stats-bar .container { padding: 0; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 30px;
    border-inline-start: 1px solid var(--card-border);
}
.stat-item:last-child { border-inline-start: none; }
.stat-item .ic {
    width: 46px; height: 46px;
    border-radius: 10px;
    background: rgba(59,110,165,.1);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-item .num { font-size: 24px; font-weight: 900; direction: ltr; }
.stat-item .lbl { font-size: 13px; color: var(--text-mute); margin-top: 2px; }

/* ── SECTION shared ── */
.section { padding: 60px 0; position: relative; }
section.section:nth-of-type(even) { background: var(--bg-alt); }
section.section:nth-of-type(even)::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; font-weight: 900; }
.section-head h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 14px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transition: transform .6s ease .15s;
}
.section-head.in-view h2::after { transform: scaleX(1); }
.section-head .k {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* ── SCROLL REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.22,.7,.3,1), transform .7s cubic-bezier(.22,.7,.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.services-grid > *:nth-child(2), .stats-grid > *:nth-child(2), .testi-grid > *:nth-child(2),
.projects-grid > *:nth-child(2), .skills-grid > *:nth-child(2), .timeline-strip > *:nth-child(2) { transition-delay: .08s; }
.services-grid > *:nth-child(3), .stats-grid > *:nth-child(3), .testi-grid > *:nth-child(3),
.projects-grid > *:nth-child(3), .skills-grid > *:nth-child(3), .timeline-strip > *:nth-child(3) { transition-delay: .16s; }
.services-grid > *:nth-child(4), .stats-grid > *:nth-child(4), .testi-grid > *:nth-child(4),
.projects-grid > *:nth-child(4), .skills-grid > *:nth-child(4), .timeline-strip > *:nth-child(4) { transition-delay: .24s; }
.services-grid > *:nth-child(5), .skills-grid > *:nth-child(5) { transition-delay: .32s; }
.services-grid > *:nth-child(6), .skills-grid > *:nth-child(6) { transition-delay: .4s; }

/* ── SERVICES ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.service-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 26px 22px;
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.service-card:hover { border-color: var(--gold); transform: translateY(-6px); box-shadow: 0 20px 45px -20px rgba(59,110,165,.5); }
.service-card .ic {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(59,110,165,.1);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.service-card .t { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; }
.service-card .d { font-size: 13.5px; color: var(--text-mute); line-height: 1.75; }

/* ── PROJECTS ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}
.project-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 24px 50px -20px rgba(59,110,165,.5); }
.project-thumb {
    height: 230px;
    padding: 14px;
    background: linear-gradient(135deg, #eaf2fb, #dbe8f7);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}
.project-thumb img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.project-thumb .ph-label {
    color: var(--gold-light);
    font-size: 26px;
    font-weight: 900;
    opacity: .35;
    letter-spacing: 1px;
}
.project-body { padding: 20px 22px 22px; }
.project-body .t { font-size: 18px; font-weight: 800; color: var(--gold-light); margin-bottom: 8px; }
.project-body .d { font-size: 13px; color: var(--text-mute); line-height: 1.75; margin-bottom: 14px; min-height: 68px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
    font-size: 11px;
    font-weight: 700;
    background: rgba(59,110,165,.1);
    color: var(--gold-light);
    padding: 4px 10px;
    border-radius: 6px;
}
.project-links { display: flex; gap: 10px; border-top: 1px solid var(--card-border); padding-top: 14px; }
.project-links a, .project-links button, .project-links .disabled {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-mute);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: none;
    font-family: inherit;
    cursor: pointer;
}
.project-links a:hover, .project-links button:hover { color: var(--gold-light); border-color: var(--gold); }
.project-links .disabled { opacity: .4; cursor: not-allowed; }

/* ── PROJECT DETAILS MODAL ── */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.project-modal.open { display: flex; }
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(3px);
}
.modal-box {
    position: relative;
    z-index: 2;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    max-width: 620px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 14px; left: 14px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    border: 1px solid var(--card-border);
    color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    cursor: pointer;
    z-index: 3;
}
.modal-close:hover { color: var(--gold-light); border-color: var(--gold); }
.modal-thumb {
    height: 280px;
    padding: 16px;
    background: linear-gradient(135deg, #eaf2fb, #dbe8f7);
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.modal-thumb img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.modal-body { padding: 26px 28px 30px; }
.modal-title { font-size: 22px; font-weight: 900; color: var(--gold-light); margin-bottom: 10px; }
.modal-desc { font-size: 14px; color: var(--text-mute); line-height: 1.85; margin-bottom: 16px; }
.modal-tags { margin-bottom: 20px; }
.modal-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.modal-features li {
    font-size: 13.5px;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.6;
}
.modal-features li i { color: var(--gold); margin-top: 2px; flex-shrink: 0; }

/* ── SKILLS ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.skill-item {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 22px 10px;
    text-align: center;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.skill-item:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 16px 36px -18px rgba(59,110,165,.5); }
.skill-item i { font-size: 30px; color: var(--gold); margin-bottom: 10px; display: block; transition: transform .25s; }
.skill-item:hover i { transform: scale(1.15); }
.skill-item span { font-size: 12.5px; font-weight: 700; color: var(--text-mute); }

/* ── TIMELINE ── */
.timeline-strip {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    position: relative;
}
.tl-item { flex: 1; text-align: center; position: relative; }
.tl-item .ic {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    position: relative;
    z-index: 2;
}
.tl-item .year { font-size: 21px; font-weight: 900; color: var(--gold-light); margin-bottom: 6px; direction: ltr; }
.tl-item .desc { font-size: 12.5px; color: var(--text-mute); line-height: 1.7; padding: 0 10px; }
.tl-connector {
    position: absolute;
    top: 29px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px);
    inset-inline-start: -50%;
    inset-inline-end: 50%;
    z-index: 1;
}
.tl-item:first-child .tl-connector { display: none; }

/* ── TESTIMONIALS ── */
#testimonials { overflow: hidden; }
#testimonials::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(59,110,165,.16), transparent 70%);
    filter: blur(80px);
    top: -100px;
    left: -80px;
    z-index: 0;
    pointer-events: none;
    animation: blobFloat1 15s ease-in-out infinite;
}
#testimonials .container { position: relative; z-index: 1; }
.testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.testi-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 24px 22px;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.testi-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 20px 45px -20px rgba(59,110,165,.45); }
.testi-stars { color: var(--gold); font-size: 13px; margin-bottom: 12px; letter-spacing: 2px; }
.testi-text { font-size: 13.5px; color: var(--text-mute); line-height: 1.8; margin-bottom: 20px; }
.testi-who { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b6ea5, #2c5580);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    color: #ffffff;
    font-weight: 800;
}
.testi-who .n { font-size: 14px; font-weight: 800; }
.testi-who .r { font-size: 11.5px; color: var(--text-mute); }

/* ── CONTACT / FOOTER ── */
.contact-cta {
    background: linear-gradient(135deg, #eef4fb, #dbe8f7);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.contact-cta::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(59,110,165,.28), transparent 70%);
    filter: blur(70px);
    bottom: -110px;
    right: -70px;
    z-index: 0;
    pointer-events: none;
}
.contact-cta > * { position: relative; z-index: 1; }
.contact-cta h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.contact-cta p { font-size: 13.5px; color: var(--text-mute); }

.footer {
    border-top: 1px solid var(--card-border);
    padding: 30px 0;
}
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-mute);
}
.footer-info { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-info span { display: flex; align-items: center; gap: 8px; }
.footer-info i { color: var(--gold); }

/* ── FLOATING BUTTONS ── */
.float-btn {
    position: fixed;
    left: 26px;
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 23px;
    box-shadow: 0 6px 18px rgba(30,60,90,.25);
    z-index: 90;
    transition: transform .2s, opacity .2s, box-shadow .2s;
}
.float-btn:hover { transform: scale(1.08); box-shadow: 0 8px 22px rgba(30,60,90,.35); }

.whatsapp-float {
    bottom: 26px;
    background: #25D366;
    color: #fff;
}

.scroll-top {
    bottom: 90px;
    background: var(--gold);
    color: #ffffff;
    border: none;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
}
.scroll-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--card-border);
        padding: 0 24px;
        gap: 18px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height .35s ease, opacity .3s ease, padding .35s ease;
    }
    .nav-links.open { max-height: 420px; opacity: 1; padding: 18px 24px 24px; }
    .btn-cv { display: none; }
    .nav-toggle { display: block; }
    .hero .container { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-inline-start: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
    .testi-grid { grid-template-columns: 1fr; }
    .timeline-strip { flex-wrap: wrap; }
    .tl-connector { display: none; }
}
