:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 25, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.5);
    --accent-secondary: #8a2be2;
    --text-main: #ffffff;
    --text-dim: #a1a1aa;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

[dir="rtl"] {
    font-family: 'Noto Sans Arabic', 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 100vh;
    position: relative;
}

/* ================= BACKGROUND GLOW ================= */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.1), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(138, 43, 226, 0.1), transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(0, 240, 255, 0.05), transparent 50%);
    filter: blur(60px);
    pointer-events: none;
}

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

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 240, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

.reveal {
    /* Initially visible in case JS fails */
    visibility: visible;
}

.reveal.is-visible {
    animation: fadeInUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* ================= NAV ================= */
.top-nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: var(--transition);
}

.top-nav:hover {
    border-color: rgba(255,255,255,0.15);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--accent-glow);
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link:hover::after {
    width: 100%;
}

.lang-toggle {
    display: flex;
    gap: 8px;
    border-left: 1px solid var(--card-border);
    padding-left: 20px;
}

[dir="rtl"] .lang-toggle {
    border-left: none;
    border-right: 1px solid var(--card-border);
    padding-left: 0;
    padding-right: 20px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 6px;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.lang-btn.active {
    color: var(--accent);
    background: rgba(0, 240, 255, 0.1);
}

/* ================= HERO ================= */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(48px, 8vw, 90px);
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 22px);
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 40px;
    font-weight: 400;
}

.btn-primary {
    display: inline-block;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.2);
    transition: var(--transition);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.3);
}

/* ================= SECTIONS ================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 120px 20px;
}

.section-header {
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accent-text {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* ================= ABOUT ================= */
.about-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.about-text {
    font-size: 24px;
    line-height: 1.6;
    color: var(--text-main);
    font-weight: 300;
}

.skills-container {
    margin-top: 40px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.skill-tag {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

.skill-tag:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--accent);
    transform: translateY(-2px);
}

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

.contact-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--card-border);
    transition: var(--transition);
    backdrop-filter: blur(20px);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    font-size: 20px;
    font-weight: 900;
    color: var(--accent);
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

.contact-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

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

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: var(--transition);
    backdrop-filter: blur(20px);
    position: relative;
    group: project;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.project-content {
    padding: 40px;
    position: relative;
    z-index: 1;
}

.project-content h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    transition: var(--transition);
}

.project-card:hover .project-content h3 {
    color: var(--accent);
}

.project-content p {
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.6;
}

/* ================= FOOTER ================= */
footer {
    padding: 60px 20px;
    border-top: 1px solid var(--card-border);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-dim);
    font-size: 15px;
}

/* ================= MEDIA QUERIES ================= */
@media (max-width: 768px) {
    .section-title {
        font-size: 36px;
    }
    
    .about-card {
        padding: 30px;
    }
    
    .about-text {
        font-size: 18px;
    }

    .top-nav {
        width: 90%;
        justify-content: space-between;
        padding: 10px 20px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 13px;
    }
}

