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

:root {
    --primary: 262 80% 58%;
    --primary-foreground: 210 20% 98%;
    --secondary: 188 96% 46%;
    --secondary-foreground: 240 10% 4%;
    --background: 240 10% 4%;
    --foreground: 210 20% 98%;
    --card: 240 10% 6%;
    --card-foreground: 210 20% 98%;
    --border: 240 10% 12%;
    --muted: 240 10% 12%;
    --muted-foreground: 240 5% 65%;
    --radius: 0.75rem;
}

* {
    border-color: hsl(var(--border));
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: 'Outfit', sans-serif;
}

html[lang="ar"] body {
    font-family: 'Cairo', 'Outfit', sans-serif;
}

.font-cairo {
    font-family: 'Cairo', sans-serif;
}

/* Custom Utilities for Pixel Perfection */
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-primary { background-color: hsl(var(--primary)); }
.text-primary { color: hsl(var(--primary)); }
.text-secondary { color: hsl(var(--secondary)); }
.border-border { border-color: hsl(var(--border)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }

.gradient-text {
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    height: 4px;
    background-color: hsl(var(--primary));
    z-index: 100;
    width: 0%;
    transition: width 0.1s ease;
}

/* Navbar blur */
nav.scrolled {
    background-color: hsla(240, 10%, 4%, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Profile Image Glow */
.profile-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, hsla(262, 80%, 58%, 0.4), hsla(188, 96%, 46%, 0.4));
    border-radius: 1.5rem;
    transform: translate(1.5rem, 1.5rem);
    z-index: -10;
    filter: blur(24px);
}

.profile-border {
    position: absolute;
    inset: 0;
    border: 1px solid hsla(255, 255%, 255%, 0.1);
    border-radius: 1.5rem;
    transform: translate(1rem, 1rem);
    z-index: -10;
}

/* Timeline Custom Styles */
.timeline-line::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1rem;
    width: 2px;
    background: linear-gradient(to bottom, transparent, hsl(var(--border)), transparent);
}

@media (min-width: 768px) {
    .timeline-line::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(200%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
}

/* Lang Toggle Button */
.lang-toggle-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.lang-toggle-btn:hover {
    background-color: hsla(262, 80%, 58%, 0.2);
    border-color: hsla(262, 80%, 58%, 0.5);
}

/* Language Selector Screen Animations */
#language-selector {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#language-selector.hidden-selector {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.animate-pulse-soft {
    animation: pulse-soft 8s infinite ease-in-out;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #20ba5a;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
    color: #fff;
}

/* RTL Adjustment */
html[lang="ar"] .whatsapp-float {
    right: auto;
    left: 2rem;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    html[lang="ar"] .whatsapp-float {
        right: auto;
        left: 1.5rem;
    }
}

/* Skill Tags */
.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    white-space: nowrap;
}

.skill-tag:hover {
    background: hsla(262, 80%, 58%, 0.12);
    border-color: hsla(262, 80%, 58%, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsla(262, 80%, 58%, 0.15);
}

/* Social Media Icon Hovers */
.social-icon-fb:hover {
    color: #1877F2 !important;
    border-color: rgba(24, 119, 242, 0.5) !important;
    background: rgba(24, 119, 242, 0.1) !important;
}

.social-icon-ig:hover {
    color: #E4405F !important;
    border-color: rgba(228, 64, 95, 0.5) !important;
    background: rgba(228, 64, 95, 0.1) !important;
}

/* Premium Gradient Border */
.premium-border {
    position: relative;
    border: none !important;
}

.premium-border::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px; /* Slightly thicker for visibility */
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.premium-border > * {
    position: relative;
    z-index: 2;
}
