/* =========================================================
   Yousef Samir — Personal Website (yousef.alxfff.com)
   Same design language as ALX FFF: dark + cyan/purple neon
   ========================================================= */

:root {
    --bg-dark: #050A14;
    --bg-card: #0C1015;
    --bg-alt: #0A0F1A;
    --primary: #00D2FF;
    --secondary: #B026FF;
    --text-light: #FFFFFF;
    --text-gray: #AAAAAA;
    --border: #2A3645;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body { background-color: var(--bg-dark); color: var(--text-light); max-width: 100%; overflow-x: hidden; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--primary); color: #000; }

/* لينكات الوصول بلوحة المفاتيح */
a:focus-visible, .hamburger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== Navbar ===== */
.navbar { position: fixed; top: 0; width: 100%; background: rgba(5, 10, 20, 0.8); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid var(--border); }
.nav-container { max-width: 1100px; margin: auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.logo { color: var(--text-light); font-size: 1.4rem; font-weight: 800; white-space: nowrap; }
.logo span { color: var(--primary); }
.nav-menu { list-style: none; display: flex; gap: 28px; }
.nav-menu a { color: var(--text-gray); transition: 0.3s; font-weight: 500; }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.btn-nav { background: transparent; color: var(--secondary); padding: 9px 16px; border-radius: 6px; font-weight: 600; transition: 0.3s; display: inline-block; border: 1px solid var(--secondary); white-space: nowrap; }
.btn-nav:hover { background: var(--secondary); color: #fff; box-shadow: 0 0 15px rgba(176, 38, 255, 0.6); }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { width: 25px; height: 3px; background: var(--text-light); border-radius: 2px; transition: 0.3s; }

/* تحسين الـ Scroll للـ Navbar المثبت */
section[id], header[id] { scroll-margin-top: 80px; }

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 130px 20px 60px;
    position: relative;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(0, 210, 255, 0.10), transparent 55%),
        radial-gradient(ellipse at 85% 110%, rgba(176, 38, 255, 0.10), transparent 55%);
}
.hero-inner { max-width: 760px; }

.avatar-ring {
    width: min(250px, 62vw);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 5px;
    margin: 0 auto 30px;
    background: conic-gradient(from 120deg, var(--primary), var(--secondary), var(--primary));
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.22), 0 0 90px rgba(176, 38, 255, 0.14);
}
.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-dark);
}

.hero-eyebrow { color: var(--text-gray); font-size: 1.15rem; }
.hero-name { font-size: clamp(2.6rem, 8vw, 4.6rem); font-weight: 800; letter-spacing: 1px; margin: 6px 0 10px; color: var(--primary); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .hero-name {
        background: linear-gradient(90deg, var(--primary) 0%, #FFFFFF 50%, var(--secondary) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
.hero-roles { color: var(--secondary); font-weight: 600; font-size: 1.15rem; text-shadow: 0 0 15px rgba(176, 38, 255, 0.4); }
.hero-roles a { color: var(--primary); transition: 0.3s; }
.hero-roles a:hover { text-shadow: 0 0 12px rgba(0, 210, 255, 0.7); }
.hero-roles .dot { color: var(--text-gray); }
.hero-tagline { max-width: 640px; margin: 18px auto 30px; color: var(--text-gray); font-size: 1.08rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* دخول نصوص الـ Hero (CSS فقط — من غير JS) */
.fade-up { animation: fadeUp 0.8s ease-out both; }
.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }
.delay-4 { animation-delay: 0.48s; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Buttons ===== */
.btn { padding: 12px 28px; border-radius: 30px; font-weight: 600; transition: 0.3s; display: inline-block; border: 2px solid transparent; }
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { box-shadow: 0 0 20px var(--primary); transform: translateY(-2px); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #000; box-shadow: 0 0 20px var(--primary); transform: translateY(-2px); }

/* ===== Sections & Containers ===== */
.section { padding: 80px 20px; text-align: center; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.container { max-width: 1100px; margin: auto; }
.header-title { font-size: 2.6rem; color: var(--primary); text-shadow: 0 0 15px rgba(0, 210, 255, 0.5); margin-bottom: 40px; letter-spacing: 1px; }
.section-sub { color: var(--text-gray); max-width: 620px; margin: -20px auto 35px; font-size: 1.05rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: start; text-align: left; }
.about-text p { color: var(--text-gray); line-height: 1.85; font-size: 1.05rem; margin-bottom: 18px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--primary); }
.facts-card { background: linear-gradient(145deg, #131923, #0C1015); border: 1px solid var(--border); border-radius: 15px; padding: 25px; border-left: 4px solid var(--secondary); }
.facts-card h3 { color: var(--text-light); font-size: 1.25rem; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.facts-card li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-gray); padding: 10px 0; border-bottom: 1px dashed rgba(42, 54, 69, 0.5); font-size: 0.97rem; }
.facts-card li:last-child { border-bottom: none; }
.fact-icon { flex-shrink: 0; }

/* ===== Featured Project ===== */
.project-card {
    background: linear-gradient(145deg, #131923, #0C1015);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 20px;
    padding: 35px;
    text-align: left;
    max-width: 860px;
    margin: auto;
    transition: 0.3s;
}
.project-card:hover { border-color: var(--primary); box-shadow: 0 10px 40px rgba(0, 210, 255, 0.08); }
.project-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; margin-bottom: 18px; }
.project-head h3 { font-size: 1.7rem; color: var(--text-light); }
.project-head .muted { color: var(--text-gray); font-size: 1.05rem; font-weight: 400; }
.badge { background: rgba(176, 38, 255, 0.12); color: var(--secondary); border: 1px solid var(--secondary); padding: 6px 14px; border-radius: 30px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.project-desc { color: var(--text-gray); line-height: 1.85; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip { background: rgba(0, 210, 255, 0.06); border: 1px solid var(--border); color: var(--text-light); padding: 8px 16px; border-radius: 30px; font-size: 0.9rem; font-weight: 500; transition: 0.3s; }
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.project-role { color: var(--text-gray); line-height: 1.8; margin-bottom: 25px; }
.project-role strong { color: var(--primary); }

/* ===== Skills ===== */
.skills-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 860px; margin: auto; }
.skill-chip {
    background: linear-gradient(145deg, #131923, #0C1015);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: 0.3s;
}
.skill-chip:hover { border-color: var(--primary); color: var(--text-light); transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0, 210, 255, 0.10); }

/* ===== Contact ===== */
.contact-wrap { max-width: 800px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer { background: #02050A; border-top: 2px solid var(--primary); padding: 40px 20px; text-align: center; }
.footer p { color: var(--text-gray); font-size: 0.95rem; }
.footer .footer-link { margin-top: 8px; font-size: 0.9rem; }
.footer .footer-link a { color: var(--primary); transition: 0.3s; }
.footer .footer-link a:hover { text-shadow: 0 0 12px rgba(0, 210, 255, 0.7); }

/* ===== Scroll Reveal Animations (نفس نظام ALX FFF) ===== */
.reveal-init { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal-init.reveal-visible { opacity: 1; transform: translateY(0); }

/* احترام تقليل الحركة (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-up, .delay-1, .delay-2, .delay-3, .delay-4 { animation: none; }
    .reveal-init { opacity: 1; transform: none; transition: none; }
    .btn, .btn-primary, .btn-outline, .chip, .skill-chip { transition: none; }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 10, 20, 0.97);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.open { max-height: 320px; }
    .nav-menu li { padding: 14px 20px; border-top: 1px solid rgba(42, 54, 69, 0.4); }
    .nav-menu li:first-child { border-top: none; }
    .hamburger { display: flex; }
    .btn-nav { padding: 8px 12px; font-size: 0.9rem; }

    .hero { padding: 110px 15px 50px; }
    .hero-roles { font-size: 1rem; }
    .hero-tagline { font-size: 1rem; }
    .hero-cta .btn { width: 100%; text-align: center; }

    .section { padding: 55px 15px; }
    .header-title { font-size: 1.9rem; margin-bottom: 30px; }

    .about-grid { grid-template-columns: 1fr; }
    .project-card { padding: 25px 20px; }
    .project-head { flex-direction: column; align-items: flex-start; }
    .project-head h3 { font-size: 1.4rem; }
    .contact-actions .btn { width: 100%; text-align: center; }
}
