/* ========================================
   Root Variables & Reset
   Blue & White Theme
======================================== */
:root {
    /* Main Colors - Blue Only */
    --primary-blue: #2563eb;
    --primary-blue-light: #3b82f6;
    --primary-blue-dark: #1d4ed8;

    /* Background */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 50%, #f8fafc 100%);

    /* Text Colors */
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --text-white: #ffffff;

    /* Card/Glass Colors */
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(37, 99, 235, 0.1);
    --card-shadow: rgba(37, 99, 235, 0.1);

    /* Glow Effects */
    --glow-blue: rgba(37, 99, 235, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg-white);
    color: var(--text-dark);
    position: relative;
}

/* ========================================
   Animated Background
======================================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--bg-gradient);
    overflow: hidden;
}

/* Animated Gradient Orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: orbFloat 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.15);
    }

    50% {
        transform: translate(-40px, 40px) scale(0.9);
    }

    75% {
        transform: translate(40px, 25px) scale(1.1);
    }
}

/* Floating Particles */
.bg-animation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 85%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.08) 0%, transparent 40%);
    animation: shimmerBg 15s infinite ease-in-out;
}

@keyframes shimmerBg {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

/* ========================================
   Site Header - Logo and Language Toggle
======================================== */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: transparent;
    animation: slideDown 0.8s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-logo {
    width: 70px;
    height: auto;
    transition: transform 0.3s ease;
    animation: fadeIn 1s ease forwards 0.3s;
    opacity: 0;
}

.header-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lang-toggle {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    transition: all 0.4s ease;
    animation: fadeIn 1s ease forwards 0.4s;
    opacity: 0;
    box-shadow: 0 4px 15px var(--glow-blue);
}

.lang-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px var(--glow-blue);
}

/* ========================================
   Main Container
======================================== */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 130px 30px 60px;
    position: relative;
    z-index: 1;
}

/* ========================================
   Hero Section
======================================== */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease forwards;
}

.profile-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
}

/* Animated Ring */
/* Animated Ring - Ripple Effect */
.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 0;
}

.profile-glow::before,
.profile-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary-blue);
    opacity: 0;
    animation: rippleEffect 2.5s infinite ease-out;
}

.profile-glow::after {
    animation-delay: 1.25s;
}

@keyframes rippleEffect {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
        border-width: 4px;
    }

    100% {
        width: 160%;
        height: 160%;
        opacity: 0;
        border-width: 0px;
    }
}

.profile-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-white);
    z-index: 1;
    transition: transform 0.4s ease;
    animation: scaleIn 0.8s ease forwards 0.2s;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-image:hover {
    transform: scale(1.08);
}

.name {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    animation: fadeInUp 0.8s ease forwards 0.3s;
    opacity: 0;
}

.tagline {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 12px;
    animation: fadeInUp 0.8s ease forwards 0.4s;
    opacity: 0;
}

.about-text {
    font-size: 1.15rem;
    color: var(--text-medium);
    line-height: 1.8;
    animation: fadeInUp 0.8s ease forwards 0.5s;
    opacity: 0;
    margin-bottom: 25px;
}

/* Hero Social Links */
.hero-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
    animation: fadeInUp 0.8s ease forwards 0.6s;
    opacity: 0;
}

.hero-social-links .social-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-white);
    border: 2px solid var(--card-border);
    border-radius: 50%;
    font-size: 1.3rem;
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--card-shadow);
}

.hero-social-links .social-btn:hover {
    background: var(--primary-blue);
    color: var(--text-white);
    border-color: transparent;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px var(--glow-blue);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Section Titles
======================================== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    animation: fadeInUp 0.8s ease forwards;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-light));
    margin: 12px auto 0;
    border-radius: 2px;
    animation: expandWidth 0.8s ease forwards 0.3s;
    transform: scaleX(0);
}

@keyframes expandWidth {
    to {
        transform: scaleX(1);
    }
}

/* ========================================
   Stats Section
======================================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 500px;
    margin: 0 auto 60px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px var(--card-shadow);
    animation: bounceIn 0.8s ease forwards;
    opacity: 0;
}

.stat-card:nth-child(1) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.4s;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }

    50% {
        transform: scale(1.05) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px var(--glow-blue);
    border-color: var(--primary-blue);
}

.stat-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
}

/* ========================================
   Skills Section
======================================== */
.skills-section {
    margin-bottom: 60px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 650px;
    margin: 0 auto;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px var(--card-shadow);
    animation: flipIn 0.8s ease forwards;
    opacity: 0;
}

.skill-item:nth-child(1) {
    animation-delay: 0.1s;
}

.skill-item:nth-child(2) {
    animation-delay: 0.2s;
}

.skill-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(-90deg);
    }

    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

.skill-item:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--primary-blue-light);
    box-shadow: 0 15px 35px var(--glow-blue);
}

.skill-item i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.skill-item:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* ========================================
   Social Links Section
======================================== */
.social-section {
    margin-bottom: 50px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.social-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-white);
    border: 2px solid var(--card-border);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--card-shadow);
    animation: popIn 0.6s ease forwards;
    opacity: 0;
}

.social-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.social-btn:nth-child(2) {
    animation-delay: 0.15s;
}

.social-btn:nth-child(3) {
    animation-delay: 0.2s;
}

.social-btn:nth-child(4) {
    animation-delay: 0.25s;
}

.social-btn:nth-child(5) {
    animation-delay: 0.3s;
}

.social-btn:nth-child(6) {
    animation-delay: 0.35s;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.social-btn:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: var(--text-white);
    border-color: transparent;
    transform: translateY(-8px) scale(1.15) rotate(360deg);
    box-shadow: 0 15px 35px var(--glow-blue);
}

/* ========================================
   CTA Section
======================================== */
.cta-section {
    text-align: center;
    margin-bottom: 50px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 45px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 50px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px var(--glow-blue);
    animation: fadeInUp 0.8s ease forwards 0.5s;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 45px var(--glow-blue);
}

.cta-button i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(-8px);
    animation: arrowBounce 0.5s ease infinite;
}

@keyframes arrowBounce {

    0%,
    100% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(-12px);
    }
}

[dir="ltr"] .cta-button i {
    transform: rotate(180deg);
}

[dir="ltr"] .cta-button:hover i {
    transform: rotate(180deg) translateX(-8px);
}

/* ========================================
   Footer
======================================== */
.footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .container {
        padding: 130px 20px 50px;
    }

    .site-header {
        padding: 15px 20px;
    }

    .header-logo {
        width: 60px;
    }

    .lang-toggle {
        padding: 10px 20px;
        font-size: 13px;
    }

    .profile-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .name {
        font-size: 2.4rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 25px 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .skill-item {
        padding: 20px 15px;
        font-size: 0.9rem;
    }

    .skill-item i {
        font-size: 1.5rem;
    }

    .social-btn {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }

    .cta-button {
        padding: 15px 35px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 120px 15px 40px;
    }

    .header-logo {
        width: 65px;
    }

    .lang-toggle {
        padding: 8px 16px;
        font-size: 12px;
    }

    .profile-image-wrapper {
        width: 130px;
        height: 130px;
    }

    .name {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .stats-section {
        gap: 12px;
    }

    .stat-card {
        padding: 20px 15px;
        border-radius: 18px;
    }

    .stat-icon {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .skill-item {
        padding: 18px 12px;
        gap: 8px;
    }

    .skill-item i {
        font-size: 1.3rem;
    }

    .social-links {
        gap: 12px;
    }

    .social-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* ========================================
   Accessibility
======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.social-btn:focus-visible,
.cta-button:focus-visible,
.lang-toggle:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 4px;
}

/* Selection */
::selection {
    background: var(--primary-blue);
    color: var(--text-white);
}