:root {
    /* Color Palette - Cyber Brutalism / Neo Dark */
    --bg-color: #050505;
    --surface-color: #121212;
    --surface-light: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    
    --accent-primary: #00ff88; /* Neon Green */
    --accent-secondary: #00d4ff; /* Neon Blue */
    --accent-tertiary: #bd00ff; /* Neon Purple */
    
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-display: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
    
    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 255, 136, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.2s, height 0.2s, background-color 0.2s;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Typography Classes */
h1, h2, h3, h4, .font-display {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(to left, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.mt-4 {
    margin-top: var(--space-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition-normal);
    cursor: none;
    position: relative;
    overflow: hidden;
    border: none;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-outline {
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background-color: var(--accent-primary);
    color: var(--bg-color);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

/* WhatsApp Button */
.whatsapp-btn {
    background-color: #25D366;
    color: #fff;
    gap: 0.5rem;
}

.whatsapp-btn:hover {
    background-color: #1ebe5d;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md) 0;
    z-index: 500;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: var(--space-sm) 0;
    background-color: rgba(5, 5, 5, 0.9);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 600;
    position: relative;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.logo-text .accent {
    color: var(--accent-primary);
}

.logo-en {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-right: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:not(.btn):hover {
    color: var(--accent-primary);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 600;
    position: relative;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 490;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
}

.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0,255,136,0.05) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-secondary);
    margin-bottom: var(--space-md);
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.5;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-primary);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Sections General */
section {
    padding: var(--space-xl) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-lg);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(to left, var(--accent-primary), transparent);
}

.subsection-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.service-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
    border-radius: 8px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 136, 0.05), transparent);
    transform: translateX(100%);
    transition: transform 0.6s ease;
}

.service-card:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-5px);
}

.service-card:hover::before {
    transform: translateX(-100%);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    display: inline-block;
    padding: 1rem;
    background-color: rgba(255,255,255,0.03);
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.project-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background-color: var(--surface-color);
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-normal);
    border-radius: 8px;
    cursor: none;
}

.project-card:hover {
    background-color: var(--surface-light);
    border-color: var(--accent-secondary);
}

.project-content h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.project-card:hover .project-content h4 {
    color: var(--accent-secondary);
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-link-icon {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    opacity: 0.5;
    transition: var(--transition-fast);
}

.project-card:hover .project-link-icon {
    opacity: 1;
    transform: translate(-5px, -5px);
}

.in-dev {
    cursor: default;
    border-style: dashed;
    display: block;
}

.in-dev:hover {
    background-color: var(--surface-color);
    border-color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-tertiary), var(--accent-secondary));
    display: flex;
    align-items: center;
    padding-right: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
}

/* About */
.about {
    position: relative;
}

.about-content {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: var(--space-lg);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.about-content::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background-color: var(--accent-primary);
    filter: blur(100px);
    opacity: 0.2;
    z-index: 0;
}

.about-content * {
    position: relative;
    z-index: 1;
}

.about-text {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.8;
    max-width: 800px;
}

/* Contact */
.contact-card {
    background: linear-gradient(135deg, rgba(0,255,136,0.1), rgba(0,0,0,0));
    border: 1px solid rgba(0,255,136,0.3);
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    border-radius: 16px;
}

.contact-card h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: var(--space-lg);
}

/* Footer */
footer {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* WhatsApp FAB */
.wa-fab {
    position: fixed;
    bottom: 5rem;
    left: 1.5rem;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 400;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.wa-fab:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.wa-fab svg {
    pointer-events: none;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 44px;
    height: 44px;
    background-color: var(--surface-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100dvh;
        background-color: var(--surface-color);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 2rem;
        padding: 2rem var(--space-md);
        z-index: 550;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.3rem;
    }

    .mobile-nav-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-nav-overlay.active {
        pointer-events: auto;
    }

    .cursor-dot, .cursor-outline {
        display: none;
    }

    body {
        cursor: auto;
    }

    .btn {
        cursor: pointer;
    }

    .project-card {
        cursor: pointer;
    }

    .wa-fab, .back-to-top {
        cursor: pointer;
    }

    .hamburger {
        cursor: pointer;
    }

    .wa-fab {
        bottom: 5.5rem;
        left: 1rem;
    }

    .back-to-top {
        bottom: 1rem;
        left: 1rem;
    }
}
