/* ===== CSS Variables - Light Theme ===== */
:root {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2ff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(108, 99, 255, 0.1);
    --border-light: #e8eaf0;
    --text-primary: #1a1a2e;
    --text-secondary: #555770;
    --text-muted: #8b8da3;
    --accent-1: #6c63ff;
    --accent-2: #00b894;
    --accent-3: #ff6b9d;
    --accent-4: #3b82f6;
    --gradient-main: linear-gradient(135deg, #6c63ff 0%, #00b894 100%);
    --gradient-warm: linear-gradient(135deg, #ff6b9d 0%, #ffa94d 100%);
    --gradient-cool: linear-gradient(135deg, #6c63ff 0%, #3b82f6 100%);
    --shadow-sm: 0 2px 8px rgba(108,99,255,0.06);
    --shadow-md: 0 8px 32px rgba(108,99,255,0.08);
    --shadow-lg: 0 16px 48px rgba(108,99,255,0.12);
    --shadow-glow: 0 0 30px rgba(108,99,255,0.1);
    --shadow-card: 0 4px 20px rgba(0,0,0,0.04);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-1);
    color: #fff;
}

a {
    color: var(--accent-1);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: #5a52d9;
    }

/* ===== Animated Background ===== */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

    .bg-pattern::before {
        content: '';
        position: absolute;
        width: 700px;
        height: 700px;
        background: radial-gradient(circle, rgba(108,99,255,0.06) 0%, transparent 70%);
        top: -300px;
        right: -200px;
        border-radius: 50%;
        animation: floatOrb 20s ease-in-out infinite;
    }

    .bg-pattern::after {
        content: '';
        position: absolute;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(0,184,148,0.05) 0%, transparent 70%);
        bottom: -200px;
        left: -200px;
        border-radius: 50%;
        animation: floatOrb 25s ease-in-out infinite reverse;
    }

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 50px) scale(0.95);
    }

    75% {
        transform: translate(30px, 20px) scale(1.05);
    }
}

/* ===== Navbar ===== */
.navbar-custom {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.8rem 0;
    transition: var(--transition);
    z-index: 1000;
}

    .navbar-custom.scrolled {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: var(--shadow-md);
    }

    .navbar-custom .navbar-brand {
        font-size: 1.4rem;
        font-weight: 700;
        background: var(--gradient-main);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: -0.5px;
    }

    .navbar-custom .nav-link {
        color: var(--text-secondary) !important;
        font-weight: 500;
        font-size: 0.95rem;
        padding: 0.5rem 1rem !important;
        border-radius: var(--radius-sm);
        transition: var(--transition);
        position: relative;
    }

        .navbar-custom .nav-link:hover,
        .navbar-custom .nav-link.active {
            color: var(--accent-1) !important;
            background: rgba(108, 99, 255, 0.06);
        }

        .navbar-custom .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 2px;
            background: var(--gradient-main);
            transition: var(--transition);
            transform: translateX(-50%);
        }

        .navbar-custom .nav-link:hover::after,
        .navbar-custom .nav-link.active::after {
            width: 60%;
        }

.lang-toggle {
    display: flex;
    gap: 4px;
    background: rgba(108,99,255,0.06);
    border-radius: 20px;
    padding: 3px;
}

    .lang-toggle .btn {
        border: none;
        border-radius: 18px;
        padding: 4px 14px;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-secondary);
        background: transparent;
        transition: var(--transition);
    }

        .lang-toggle .btn:hover,
        .lang-toggle .btn.active {
            background: var(--accent-1);
            color: #fff;
        }

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - 160px);
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(108,99,255,0.06) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

.hero-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid transparent;
    background-image: var(--gradient-main);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--accent-1);
    background-color: var(--bg-card);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(108,99,255,0.15);
}

    .hero-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

.hero-name {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

    .hero-name .gradient-text {
        background: var(--gradient-main);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.hero-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-bio {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-gradient {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(108,99,255,0.25);
}

    .btn-gradient:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(108,99,255,0.35);
        color: #fff;
    }

.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

    .btn-outline-custom:hover {
        border-color: var(--accent-1);
        color: var(--accent-1);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

/* ===== CV Download Banner ===== */
.cv-banner {
    background: var(--bg-card);
    border: 2px dashed var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    margin: 2rem 0 3rem;
    transition: var(--transition);
}

    .cv-banner:hover {
        border-color: var(--accent-1);
        box-shadow: var(--shadow-glow);
    }

.cv-banner-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,184,148,0.1));
    border-radius: 20px;
    font-size: 1.8rem;
    color: var(--accent-1);
    margin: 0 auto 1rem;
}

.cv-banner-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cv-banner-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ===== Section Styling ===== */
.content-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out both;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.section-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

    .section-icon.skills-icon {
        background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(108,99,255,0.03));
        color: var(--accent-1);
    }

    .section-icon.projects-icon {
        background: linear-gradient(135deg, rgba(0,184,148,0.12), rgba(0,184,148,0.03));
        color: var(--accent-2);
    }

    .section-icon.certs-icon {
        background: linear-gradient(135deg, rgba(255,107,157,0.12), rgba(255,107,157,0.03));
        color: var(--accent-3);
    }

    .section-icon.about-icon {
        background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.03));
        color: var(--accent-4);
    }

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

    .glass-card:hover {
        background: var(--bg-card-hover);
        border-color: rgba(108, 99, 255, 0.15);
        box-shadow: var(--shadow-glow);
        transform: translateY(-4px);
    }

/* ===== Skills ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.skill-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

    .skill-item:hover {
        border-color: rgba(108, 99, 255, 0.2);
        box-shadow: var(--shadow-glow);
        transform: translateY(-2px);
    }

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.skill-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.skill-level {
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-bar {
    height: 8px;
    background: rgba(108,99,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--gradient-main);
    position: relative;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

    .skill-bar-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        animation: shimmer 2s ease-in-out infinite;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===== Projects ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

    .project-card:hover {
        border-color: rgba(0, 184, 148, 0.25);
        box-shadow: 0 8px 30px rgba(0, 184, 148, 0.1);
        transform: translateY(-4px);
    }

.project-card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .project-status.completed {
        background: rgba(0, 184, 148, 0.08);
        color: var(--accent-2);
        border: 1px solid rgba(0, 184, 148, 0.15);
    }

    .project-status.in-progress {
        background: rgba(255, 169, 77, 0.08);
        color: #e8890c;
        border: 1px solid rgba(255, 169, 77, 0.15);
    }

.project-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.project-card-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tag {
    padding: 4px 12px;
    background: rgba(108, 99, 255, 0.06);
    color: var(--accent-1);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(108, 99, 255, 0.1);
}

.project-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

    .project-link:hover {
        color: var(--accent-1);
    }

.project-date {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Certificates ===== */
.certs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cert-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

    .cert-item:hover {
        border-color: rgba(255, 107, 157, 0.2);
        box-shadow: 0 8px 30px rgba(255, 107, 157, 0.08);
        transform: translateX(4px);
    }

[dir="rtl"] .cert-item:hover {
    transform: translateX(-4px);
}

.cert-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,107,157,0.1), rgba(255,107,157,0.03));
    border-radius: 14px;
    font-size: 1.3rem;
    color: var(--accent-3);
}

.cert-info {
    flex: 1;
}

.cert-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.cert-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cert-link {
    padding: 6px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

    .cert-link:hover {
        border-color: var(--accent-3);
        color: var(--accent-3);
        background: rgba(255, 107, 157, 0.04);
    }

/* ===== About Section ===== */
.about-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.9;
    max-width: 700px;
}

/* ===== Contact Page ===== */
.contact-section {
    padding: 3rem 0;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

    .contact-header h1 {
        font-size: 2.5rem;
        font-weight: 800;
        margin-bottom: 0.5rem;
    }

    .contact-header p {
        color: var(--text-muted);
        font-size: 1.05rem;
    }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

    .contact-card:hover {
        transform: translateY(-4px);
        border-color: rgba(108,99,255,0.2);
        box-shadow: var(--shadow-glow);
    }

.contact-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

    .contact-card-icon.email-icon {
        background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(108,99,255,0.03));
        color: var(--accent-1);
    }

    .contact-card-icon.phone-icon {
        background: linear-gradient(135deg, rgba(0,184,148,0.12), rgba(0,184,148,0.03));
        color: var(--accent-2);
    }

    .contact-card-icon.github-icon {
        background: linear-gradient(135deg, rgba(26,26,46,0.08), rgba(26,26,46,0.02));
        color: var(--text-primary);
    }

    .contact-card-icon.linkedin-icon {
        background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.03));
        color: var(--accent-4);
    }

.contact-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.contact-card-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

    .contact-card-value a {
        color: var(--text-primary);
    }

        .contact-card-value a:hover {
            color: var(--accent-1);
        }

/* ===== Login Page ===== */
.login-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--gradient-main);
    }

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,184,148,0.1));
    border-radius: 20px;
    font-size: 2rem;
    color: var(--accent-1);
    margin: 0 auto 1.2rem;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.login-form .form-control {
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    width: 100%;
}

    .login-form .form-control:focus {
        outline: none;
        border-color: var(--accent-1);
        box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
        background: #fff;
    }

    .login-form .form-control::placeholder {
        color: var(--text-muted);
    }

.login-form .input-icon-wrap {
    position: relative;
}

    .login-form .input-icon-wrap .form-control {
        padding-left: 44px;
    }

[dir="rtl"] .login-form .input-icon-wrap .form-control {
    padding-left: 16px;
    padding-right: 44px;
}

.login-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

[dir="rtl"] .login-form .input-icon {
    left: auto;
    right: 14px;
}

.login-form .btn-login {
    width: 100%;
    padding: 13px;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(108,99,255,0.25);
}

    .login-form .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(108,99,255,0.35);
    }

.login-alert {
    background: rgba(255, 107, 157, 0.08);
    border: 1px solid rgba(255, 107, 157, 0.15);
    color: #d9365e;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-alert-success {
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.15);
    color: #00855e;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Footer ===== */
.footer-custom {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

    .footer-custom .gradient-text {
        background: var(--gradient-main);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 600;
    }

/* ===== Gradient Text utility ===== */
.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

    .animate-on-scroll.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* Stagger delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #d0d0e0;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--accent-1);
    }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.05rem;
    }

    .hero-section {
        padding: 2.5rem 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .cv-banner {
        padding: 1.5rem;
    }
}

/* ===== RTL Support ===== */
[dir="rtl"] .section-header {
    flex-direction: row;
}

[dir="rtl"] .project-date {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] body {
    font-family: 'Segoe UI', 'Tahoma', system-ui, sans-serif;
}

/* ===== Navbar Toggler ===== */
.navbar-custom .navbar-toggler {
    border-color: var(--border-light);
    padding: 4px 8px;
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2826, 26, 46, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    margin-left: 8px;
    flex-shrink: 0;
}

[dir="rtl"] .theme-toggle {
    margin-left: 0;
    margin-right: 8px;
}

.theme-toggle:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: rotate(30deg);
}

.theme-toggle .bi-moon-fill {
    display: inline;
}

.theme-toggle .bi-sun-fill {
    display: none;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --bg-primary: #0d0d14;
    --bg-secondary: #14141e;
    --bg-card: #1a1a2e;
    --bg-card-hover: #22223a;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(108, 99, 255, 0.15);
    --border-light: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-card: 0 4px 20px rgba(0,0,0,0.2);
}

    [data-theme="dark"] .navbar-custom {
        background: rgba(13, 13, 20, 0.85);
    }

        [data-theme="dark"] .navbar-custom.scrolled {
            background: rgba(13, 13, 20, 0.95);
        }

        [data-theme="dark"] .navbar-custom .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }

    [data-theme="dark"] .theme-toggle .bi-moon-fill {
        display: none;
    }

    [data-theme="dark"] .theme-toggle .bi-sun-fill {
        display: inline;
    }

    [data-theme="dark"] .login-form .form-control:focus {
        background: var(--bg-card);
    }

    [data-theme="dark"] ::-webkit-scrollbar-thumb {
        background: #2a2a40;
    }

    [data-theme="dark"] .bg-pattern::before {
        background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
    }

    [data-theme="dark"] .bg-pattern::after {
        background: radial-gradient(circle, rgba(0,184,148,0.07) 0%, transparent 70%);
    }

/* ===== Admin Dashboard Styles ===== */
.admin-page {
    padding-bottom: 2rem;
}

.admin-header {
    margin-bottom: 2rem;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .admin-page-title i {
        font-size: 1.5rem;
        background: var(--gradient-main);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.admin-page-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Admin Grid */
.admin-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Admin Stat Card (Dashboard) */
.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

    .admin-stat-card:hover {
        border-color: rgba(108, 99, 255, 0.2);
        box-shadow: var(--shadow-glow);
        transform: translateY(-2px);
        color: var(--text-primary);
    }

.admin-stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.3rem;
}

.admin-stat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.admin-stat-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-stat-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.admin-stat-card:hover .admin-stat-arrow {
    color: var(--accent-1);
    transform: translateX(4px);
}

[dir="rtl"] .admin-stat-card:hover .admin-stat-arrow {
    transform: translateX(-4px);
}

/* Admin Card */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}

.admin-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 99, 255, 0.02);
}

    .admin-card-header i {
        color: var(--accent-1);
    }

.admin-card-body {
    padding: 1.5rem;
}

/* Admin Form */
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
}

.admin-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-input {
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
    width: 100%;
    font-family: inherit;
}

    .admin-input:focus {
        outline: none;
        border-color: var(--accent-1);
        box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
    }

    .admin-input::placeholder {
        color: var(--text-muted);
    }

.admin-textarea {
    min-height: 100px;
    resize: vertical;
}

.admin-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.admin-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

    .admin-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--accent-1);
        cursor: pointer;
    }

/* Admin Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.admin-btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108,99,255,0.2);
}

    .admin-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(108,99,255,0.3);
        color: #fff;
    }

.admin-btn-outline {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 2px solid var(--border-light);
}

    .admin-btn-outline:hover {
        border-color: var(--accent-1);
        color: var(--accent-1);
    }

.admin-btn-danger {
    background: rgba(255,107,157,0.1);
    color: #e8365a;
    border: 1px solid rgba(255,107,157,0.15);
}

    .admin-btn-danger:hover {
        background: rgba(255,107,157,0.15);
    }

.admin-btn-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    background: transparent;
}

.admin-btn-icon-danger {
    color: var(--text-muted);
}

    .admin-btn-icon-danger:hover {
        background: rgba(255,107,157,0.1);
        color: #e8365a;
    }

/* Admin Table */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table thead th {
        padding: 12px 16px;
        text-align: left;
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid var(--border-light);
    }

[dir="rtl"] .admin-table thead th {
    text-align: right;
}

.admin-table tbody td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: rgba(108,99,255,0.02);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Admin Badges */
.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(108,99,255,0.08);
    color: var(--accent-1);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-badge-info {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(59,130,246,0.08);
    color: #3b82f6;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-badge-success {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0,184,148,0.08);
    color: var(--accent-2);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-badge-warning {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255,169,77,0.08);
    color: #e8890c;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-badge-muted {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(139,141,163,0.08);
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-code {
    background: rgba(108,99,255,0.06);
    color: var(--accent-1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: 'Consolas', 'Courier New', monospace;
}

/* Admin Progress Bar */
.admin-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.admin-progress {
    flex: 1;
    height: 6px;
    background: rgba(108,99,255,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.admin-progress-bar {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 10px;
}

.admin-progress-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-1);
    min-width: 35px;
}

/* ===== Dynamic Section Cards ===== */
.dynamic-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.dynamic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.dynamic-card:hover {
    border-color: rgba(108, 99, 255, 0.2);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.dynamic-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(0,184,148,0.1));
    border-radius: 12px;
    font-size: 1.2rem;
    color: var(--accent-1);
    margin-bottom: 1rem;
}

.dynamic-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.3rem;
}

.dynamic-card-subtitle {
    font-size: 0.85rem;
    color: var(--accent-1);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.dynamic-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 0.75rem;
}

.dynamic-card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dynamic-card-link:hover {
    color: var(--accent-1);
}

/* ===== Dynamic Section List ===== */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dynamic-list-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.dynamic-list-item:hover {
    border-color: rgba(108, 99, 255, 0.15);
    box-shadow: var(--shadow-glow);
    transform: translateX(4px);
}

[dir="rtl"] .dynamic-list-item:hover {
    transform: translateX(-4px);
}

.dynamic-list-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(108,99,255,0.03));
    border-radius: 12px;
    font-size: 1.1rem;
    color: var(--accent-1);
}

.dynamic-list-info {
    flex: 1;
}

.dynamic-list-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.dynamic-list-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .dynamic-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Work Experience Timeline ===== */
.section-icon.exp-icon {
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.03));
    color: #10b981;
}

.exp-timeline {
    position: relative;
    padding-left: 28px;
}

[dir="rtl"] .exp-timeline {
    padding-left: 0;
    padding-right: 28px;
}

.exp-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-1) 0%, var(--accent-2) 100%);
    border-radius: 2px;
}

[dir="rtl"] .exp-timeline::before {
    left: auto;
    right: 8px;
}

.exp-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.exp-item:last-child {
    margin-bottom: 0;
}

.exp-dot {
    position: absolute;
    left: -24px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
    z-index: 1;
}

[dir="rtl"] .exp-dot {
    left: auto;
    right: -24px;
}

.exp-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.exp-content:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.exp-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.exp-company {
    font-size: 0.9rem;
    color: var(--accent-1);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.exp-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.exp-current {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.exp-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .exp-header {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ===== CV Upload Section ===== */
.cv-upload-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 184, 148, 0.05);
    border: 1px solid rgba(0, 184, 148, 0.15);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.cv-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cv-file-icon {
    font-size: 2rem;
    color: #e74c3c;
}

.cv-file-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.cv-file-status {
    font-size: 0.8rem;
    color: var(--accent-2);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cv-file-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cv-upload-area {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.cv-upload-area:hover,
.cv-upload-area.drag-over {
    border-color: var(--accent-1);
    background: rgba(108, 99, 255, 0.03);
}

.cv-upload-icon {
    font-size: 2.5rem;
    color: var(--accent-1);
    display: block;
    margin-bottom: 0.75rem;
}

.cv-upload-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.cv-upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.cv-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.cv-upload-area label {
    position: relative;
    z-index: 2;
}

.cv-selected-file {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--accent-1);
    font-weight: 600;
}

/* Admin Responsive */
@media (max-width: 768px) {
    .admin-grid-3 {
        grid-template-columns: 1fr;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-page-title {
        font-size: 1.4rem;
    }

    .admin-form-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .admin-btn-primary {
        text-align: center;
        justify-content: center;
    }
}
