/* ===================================
   Custom CSS for Portfolio Website
   Author: Asem Khabsh
   =================================== */

/* ===== Root Variables ===== */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #50C878;
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --text-color: #333333;
    --text-muted: #6C757D;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* ===== Navbar Styles ===== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition);
    color: var(--text-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1,
.hero-section h2,
.hero-section p {
    color: white;
}

.profile-image-wrapper {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.profile-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

/* ===== Fade In Animation ===== */
.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in:nth-child(1) { animation-delay: 0.2s; }
.fade-in:nth-child(2) { animation-delay: 0.4s; }
.fade-in:nth-child(3) { animation-delay: 0.6s; }
.fade-in:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Buttons ===== */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    background: #3a7bc8;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.btn-outline-primary {
    border: 2px solid white;
    color: white;
}

.btn-outline-primary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== Section Title ===== */
.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ===== Skills Progress Bars ===== */
.progress {
    height: 10px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 1.5s ease-in-out;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    animation: progressAnimation 2s ease-out;
}

@keyframes progressAnimation {
    from { width: 0; }
}

.progress-bar-95 { width: 95%; }
.progress-bar-90 { width: 90%; }
.progress-bar-88 { width: 88%; }
.progress-bar-85 { width: 85%; }
.progress-bar-80 { width: 80%; }

/* ===== Service Cards ===== */
.service-card {
    transition: var(--transition);
    border-radius: 15px;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ===== Portfolio Items ===== */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    background: white;
}

.portfolio-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 320px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(0.8);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    text-align: center;
    color: white;
    padding: 2rem;
    transform: translateY(30px);
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-info i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounceIn 0.6s ease;
}

.portfolio-info h4 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.portfolio-info p {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1rem;
}

.portfolio-info .badge {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Portfolio Grid Centering */
#portfolio .row {
    display: flex;
    justify-content: center;
}

/* Portfolio Item Stagger Animation */
.portfolio-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }

/* ===== Testimonials ===== */
.testimonial-card {
    border-radius: 20px;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.testimonial-card .bi-quote {
    font-size: 4rem;
    opacity: 0.2;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 20px;
}

/* ===== Contact Section ===== */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.15);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.25rem;
    color: white;
}

.contact-info-item {
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 10px;
}

.contact-info-item:hover {
    background: #f8f9fa;
    transform: translateX(-5px);
}

/* ===== Social Links ===== */
.social-link {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: var(--shadow-md);
    color: white;
}

.social-link:nth-child(1) { background: linear-gradient(135deg, #3b5998, #8b9dc3); }
.social-link:nth-child(2) { background: linear-gradient(135deg, #0077b5, #00a0dc); }
.social-link:nth-child(3) { background: linear-gradient(135deg, #1769ff, #4dabf7); }
.social-link:nth-child(4) { background: linear-gradient(135deg, #333, #666); }
.social-link:nth-child(5) { background: linear-gradient(135deg, #25d366, #128c7e); }
.social-link:nth-child(6) { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite 2s;
}

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

.btn-light {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.btn-light:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Footer ===== */
footer {
    background: #1a1a2e !important;
}

/* ===== Scroll Animations ===== */
section {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 991px) {
    .profile-image {
        width: 250px;
        height: 250px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .profile-image {
        width: 200px;
        height: 200px;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ===== Loading Animation ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== Utility Classes ===== */
.shadow-custom {
    box-shadow: var(--shadow-md);
}

.rounded-custom {
    border-radius: 15px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ===== Hover Effects ===== */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

