:root {
    /* Colors */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Accents */
    --accent-sky: #38bdf8;
    --accent-blue: #0ea5e9;
    --accent-mepco: #f59e0b; /* Orange */
    --accent-uni: #0ea5e9;   /* Sky Blue */
    --accent-pajo: #7e22ce;  /* Dark Purple */
    
    /* Glassmorphism */
    --glass-surface: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: 20px;
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-ar: 'Tajawal', sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

button, .pill-btn, .social-tile {
    cursor: pointer;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 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)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* Page Transition Overlay */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: var(--bg-dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out; /* Smooth fade */
}

#transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Elegant Text Theme (Shimmer) */
.elegant-text {
    background: linear-gradient(
        120deg, 
        var(--text-primary) 0%, 
        var(--text-secondary) 20%, 
        #fff 50%, 
        var(--text-secondary) 80%, 
        var(--text-primary) 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Scroll Mouse Animation */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 25px; }
}

/* Flip Effect Logic (Global) */
.lang-flip {
    position: relative;
    display: inline-block;
}

.lang-flip:hover, 
.action-pill:hover .lang-flip,
.bento-item:hover .lang-flip,
.nav-item:hover.lang-flip {
    color: transparent !important;
}

.lang-flip::after {
    content: attr(data-ar);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--accent-sky); /* Default flip color */
    opacity: 0;
    transform: translateY(10px) rotateX(-90deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    pointer-events: none;
}

/* Alignment fixes for flip */
.hero-description .lang-flip::after,
.section-title.lang-flip::after,
.contact-header h2.lang-flip::after,
.contact-header p.lang-flip::after,
.stat-label.lang-flip::after {
    justify-content: center;
}

/* Strict Centering for Buttons & Nav */
.action-pill .lang-flip::after,
.nav-item.lang-flip::after {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin: auto !important;
    top: 0 !important;
    height: 100% !important;
    padding: 0 !important;
    position: absolute !important;
    background: transparent !important;
}

.card-text.lang-flip::after,
.exp-role.lang-flip::after {
    justify-content: flex-start;
    text-align: inherit;
}

/* Theme specific flip colors */
.mepco-theme .lang-flip::after { color: var(--accent-mepco); }
.uni-theme .lang-flip::after { color: var(--accent-uni); }
.pajo-theme .lang-flip::after { color: var(--accent-pajo); }

.lang-flip:hover::after,
.action-pill:hover .lang-flip::after,
.bento-item:hover .lang-flip::after,
.nav-item:hover.lang-flip::after {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

/* Reveal Animations */
.reveal-text, .reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-text { transform: translateY(20px); }
.reveal-up { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.reveal-active {
    opacity: 1;
    transform: translate(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* 
   ========================================
   LEGENDARY CUSTOM CURSOR STYLES (SVG ARROW)
   ========================================
*/

/* Only apply on non-touch devices */
@media (pointer: fine) {
    * {
        cursor: none !important;
    }
}

.cursor-main, .cursor-ghost {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 9999;
    /* Default state hidden until mouse moves */
    opacity: 0; 
    transition: opacity 0.3s ease;
    /* Important: Use translate3d for better performance */
    will-change: transform;
}

.cursor-main svg {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cursor-ghost {
    z-index: 9998;
    opacity: 0.3;
}

.cursor-ghost svg path {
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

/* Hover Interaction State (Stronger Glow) */
.cursor-main.active svg {
    transform: scale(1.3) rotate(-10deg);
    fill: var(--accent-sky); 
    /* Intense double glow effect */
    filter: drop-shadow(0 0 10px var(--accent-sky)) drop-shadow(0 0 20px var(--accent-sky));
}

.cursor-ghost.active svg path {
    stroke: var(--accent-sky);
    opacity: 0.1;
}

