@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    /* Primary Palette - Deep Professional Tones */
    --primary-900: #0f172a;
    /* Slate 900 */
    --primary-800: #1e293b;
    /* Slate 800 */
    --primary-700: #334155;

    /* Accent Palette - Trust & Growth */
    --accent-500: #3b82f6;
    /* Blue 500 */
    --accent-600: #2563eb;
    /* Blue 600 */
    --accent-glow: rgba(59, 130, 246, 0.5);

    /* Neutral / Surface */
    --surface-100: #ffffff;
    --surface-200: #f8fafc;
    /* Slate 50 */
    --surface-300: #f1f5f9;
    /* Slate 100 */

    /* Text */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --blur-strength: 12px;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

[data-theme="dark"] {
    --surface-100: #0f172a;
    --surface-200: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Plus Jakarta Sans', sans-serif;
    background-color: var(--surface-200);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-600), var(--accent-500));
    color: white;
    box-shadow: 0 4px 6px -1px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--accent-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Typography Utility */
.display-1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.display-2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.text-lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
}

.text-gradient {
    background: linear-gradient(to right, var(--accent-600), #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- Components --- */

/* Navigation */
.nav-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-900);
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-600);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary-900);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-600);
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    padding-top: 120px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding-left: 2rem;
}

.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-card-visual {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.glass-card-visual:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-actions {
    margin-top: var(--spacing-lg);
    display: flex;
    gap: 1rem;
}

/* Filter Section */
.filter-section {
    margin: var(--spacing-xl) auto;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.category-pills {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pill {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background: var(--surface-100);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.pill:hover,
.pill.active {
    background: var(--accent-600);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    border-color: transparent;
}

/* Experience Grid */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.exp-card {
    background: var(--surface-100);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.exp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.exp-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-600);
    font-weight: 700;
}

.exp-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary-900);
}

.exp-preview {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exp-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.exp-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-500);
    /* Fallback */
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-glass {
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--accent-500), var(--accent-600)) 1;
    border-radius: var(--radius-lg);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem 1.75rem;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-glass {
    transform: scale(1) translateY(0);
}

/* Custom Scrollbar for Modal */
.modal-glass::-webkit-scrollbar {
    width: 6px;
}

.modal-glass::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.modal-glass::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    border-radius: 10px;
}

.modal-glass::-webkit-scrollbar-thumb:hover {
    background: var(--accent-600);
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    color: var(--accent-600);
    z-index: 10;
}

.modal-close:hover {
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-content {
    direction: rtl;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-600), #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.modal-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--surface-200);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-meta ion-icon {
    vertical-align: middle;
    margin-left: 0.3rem;
}

.modal-body-text {
    line-height: 1.8;
    color: var(--text-main);
}

.modal-body-text h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-900);
    font-weight: 600;
}

.modal-body-text ul {
    list-style: none;
    padding-right: 1rem;
}

.modal-body-text li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--primary-900);
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--surface-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background: white;
    transition: all 0.3s ease;
    direction: rtl;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-600);
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.08),
        0 2px 8px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-light);
    font-size: 0.85rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.9rem center;
    padding-left: 2.2rem;
}

/* Enhanced Submit Button */
.form-group .btn-primary {
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.25);
}

.form-group .btn-primary:hover {
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.35);
}

/* Footer */
.main-footer {
    background: var(--surface-100);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--surface-200);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    font-size: 1.25rem;
}

/* Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }

    .hero-content {
        padding-left: 0;
        margin-bottom: 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .glass-card-visual {
        max-width: 100%;
        transform: none;
    }

    .glass-card-visual:hover {
        transform: none;
    }
}