/* ========================================
   ESRAA GADELKAREEM - PORTFOLIO STYLES
   Premium Design System
   ======================================== */

/* CSS Variables */
:root {
    /* Colors - Light Mode */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f3f4f6;
    --text-primary: #1a1a2e;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    /* Accent Colors */
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-dark: #5b21b6;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #c4b5fd 100%);
    --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #312e81 50%, #4c1d95 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);

    /* Spacing */
    --section-padding: clamp(4rem, 10vw, 8rem);
    --container-max: 1400px;
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;

    /* Typography */
    --font-heading-en: 'Poppins', sans-serif;
    --font-body-en: 'Inter', sans-serif;
    --font-heading-ar: 'Cairo', sans-serif;
    --font-body-ar: 'Tajawal', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --text-primary: #f1f1f1;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;

    --accent-light: #c4b5fd;
    --glass-bg: rgba(30, 30, 50, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* RTL Support */
[dir="rtl"] {
    --font-heading: var(--font-heading-ar);
    --font-body: var(--font-body-ar);
}

[dir="ltr"] {
    --font-heading: var(--font-heading-en);
    --font-body: var(--font-body-en);
}

/* ========================================
   BASE STYLES
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto !important;
    /* Force browser to let GSAP handle scrolling */
    font-size: 16px;
    overflow-x: hidden;
    /* Prevent horizontal scroll from particles */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

[dir="rtl"] body {
    font-family: var(--font-body-ar);
}

[dir="ltr"] body {
    font-family: var(--font-body-en);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

/* ========================================
   LOADER
   ======================================== */
/* ========================================
   LOADER - JS Controlled
   No auto-animation. Stays visible until
   JS calls AppAnimations.hideLoader()
   ======================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    /* NO auto-animation - JS controls visibility */
}

/* Hidden state - applied by JS */
.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: white;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.nav.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    transition: color var(--transition-fast);
}

.nav.scrolled .nav-logo {
    color: var(--accent);
}

[dir="rtl"] .nav-logo {
    font-family: var(--font-heading-ar);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

.nav.scrolled .nav-link {
    color: var(--text-secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: width var(--transition-normal);
}

[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: white;
}

.nav.scrolled .nav-link:hover {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle,
.lang-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all var(--transition-fast);
}

.nav.scrolled .theme-toggle,
.nav.scrolled .lang-toggle {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-toggle:hover,
.lang-toggle:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.lang-toggle {
    width: auto;
    padding: 0 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.nav-burger span {
    width: 25px;
    height: 2px;
    background: white;
    transition: all var(--transition-fast);
}

.nav.scrolled .nav-burger span {
    background: var(--text-primary);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 5rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(167, 139, 250, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 50%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    color: white;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

[dir="rtl"] .hero-title {
    font-family: var(--font-heading-ar);
}

.hero-title-line {
    display: inline-block;
    /* Changed from block for better stability */
    white-space: nowrap;
    min-height: 1.2em;
    /* Reserve space to prevent jump on load */
    vertical-align: bottom;
}

/* REMOVED: CSS that hid hero elements before .loaded class was added.
   GSAP now controls visibility with autoAlpha, so this CSS was causing conflict. */

/* Smooth hide for hero content during language switch */
.hero-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Utility class for hiding content during language switch */
.content-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

.hero-title-accent {
    color: var(--accent-gold);
    /* Fallback color */
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* When text is split into chars, we need the chars to be visible.
   Gradient on parent with split inline-block children often fails.
   We explicitly style the chars in the accent line. */
.hero-title-accent .hero-char {
    color: var(--accent-gold);
    -webkit-text-fill-color: initial;
    /* Reset fill color to use the solid color */
    background: none;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--accent-gold);
}

.hero-stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #1a1a2e;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Hero Image */
.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: clamp(280px, 35vw, 400px);
    height: clamp(280px, 35vw, 400px);
}

.hero-image-glow {
    position: absolute;
    inset: -20px;
    background: var(--gradient-gold);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(40px);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    will-change: transform;
}

.hero-image-ring {
    position: absolute;
    inset: -15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

.hero-certifications {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cert-badge {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    will-change: transform;
}

/* Hero Scroll */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    animation: bounce 2s ease-in-out infinite;
}

.hero-scroll-icon {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
}

.hero-scroll-icon::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 2px;
    animation: scroll-indicator 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll-indicator {

    0%,
    100% {
        opacity: 1;
        top: 6px;
    }

    50% {
        opacity: 0.5;
        top: 16px;
    }
}

/* ========================================
   TICKER
   ======================================== */
.ticker {
    background: var(--accent);
    padding: 1rem 0;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    animation: ticker 30s linear infinite;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    white-space: nowrap;
    padding: 0 1rem;
}

.ticker-content span {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.ticker-dot {
    color: var(--accent-gold) !important;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

[dir="rtl"] .ticker-track {
    animation: ticker-rtl 30s linear infinite;
}

@keyframes ticker-rtl {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
}

[dir="rtl"] .section-title {
    font-family: var(--font-heading-ar);
}

/* ========================================
   GLASS CARD
   ======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
    will-change: transform;
}

/* Hover handled by GSAP for smoother animations */

[data-theme="dark"] .glass-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-main-content {
    display: grid;
    grid-template-columns: 0.45fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

/* About text animation handled by GSAP */

.about-intro {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.about-card {
    padding: 2rem;
}

.about-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

[dir="rtl"] .about-card h3 {
    font-family: var(--font-heading-ar);
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   SKILLS SECTION
   ======================================== */
.skills {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    padding: 2rem;
    text-align: center;
    will-change: transform, opacity;
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

[dir="rtl"] .skill-card h3 {
    font-family: var(--font-heading-ar);
}

.skill-card p {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 20px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
    will-change: transform, opacity;
}

[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 60px;
    /* Removed transform - GSAP handles the animation */
}

.timeline-marker {
    position: absolute;
    left: 12px;
    top: 1.5rem;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    z-index: 1;
}

[dir="rtl"] .timeline-marker {
    left: auto;
    right: 12px;
}

.timeline-content {
    padding: 1.5rem 2rem;
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

[dir="rtl"] .timeline-content h3 {
    font-family: var(--font-heading-ar);
}

.timeline-content h4 {
    color: var(--accent-gold);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   TRAINING SECTION
   ======================================== */
.training {
    background: var(--bg-secondary);
}

.training-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.training-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
}

.training-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-gold);
}

[dir="rtl"] .training-card::before {
    left: auto;
    right: 0;
}

.training-org {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.training-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

[dir="rtl"] .training-card h3 {
    font-family: var(--font-heading-ar);
}

.training-year {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-gold);
}

[dir="rtl"] .service-card::before {
    left: auto;
    right: 0;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

[dir="rtl"] .service-card h3 {
    font-family: var(--font-heading-ar);
}

.service-subtitle {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

[dir="rtl"] .service-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
}

[dir="rtl"] .service-list li::before {
    left: auto;
    right: 0;
}

/* Service card hover icon effect */
.service-card:hover .service-icon {
    animation: iconBounce 0.5s ease;
}

/* ========================================
   ACHIEVEMENTS SECTION
   ======================================== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    padding: 2rem;
    text-align: center;
    position: relative;
    will-change: transform, opacity;
}

.achievement-card.gold-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-gold);
    border-radius: var(--border-radius-lg);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-normal);
}

.achievement-card:hover.gold-glow::before {
    opacity: 0.3;
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.achievement-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

[dir="rtl"] .achievement-card h3 {
    font-family: var(--font-heading-ar);
}

.achievement-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.achievement-year {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gradient-gold);
    color: #1a1a2e;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ========================================
   MEDIA SECTION
   ======================================== */
.media {
    background: var(--bg-secondary);
}

.media-visual {
    max-width: 600px;
    margin: 0 auto 3rem;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.media-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.media-card {
    padding: 2rem;
    will-change: transform, opacity;
}

.media-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.media-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

[dir="rtl"] .media-card h3 {
    font-family: var(--font-heading-ar);
}

.media-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========================================
   EDUCATION SECTION
   ======================================== */
.education-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.education-main {
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    will-change: transform, opacity;
}

.education-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.education-main h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

[dir="rtl"] .education-main h3 {
    font-family: var(--font-heading-ar);
}

.education-main h4 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.education-year {
    color: var(--accent-gold);
    font-weight: 600;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.cert-item {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    will-change: transform, opacity;
}

.cert-badge-small {
    display: inline-block;
    width: fit-content;
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cert-item p {
    color: var(--text-primary);
    font-weight: 500;
}

.cert-item span:last-child {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    padding: 1.5rem;
    will-change: transform, opacity;
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

[dir="rtl"] .contact-card h3 {
    font-family: var(--font-heading-ar);
}

.contact-card a,
.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: block;
}

.contact-card a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.social-link svg {
    width: 22px;
    height: 22px;
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

.calendly-wrapper {
    padding: 2rem;
    will-change: transform, opacity;
}

.calendly-wrapper h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

[dir="rtl"] .calendly-wrapper h3 {
    font-family: var(--font-heading-ar);
}

.calendly-wrapper>p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-tertiary);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

[dir="rtl"] .footer-logo {
    font-family: var(--font-heading-ar);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-main-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right var(--transition-normal);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    }

    [dir="rtl"] .nav-menu {
        right: auto;
        left: -100%;
    }

    .nav-menu.active {
        right: 0;
    }

    [dir="rtl"] .nav-menu.active {
        right: auto;
        left: 0;
    }

    .nav-link {
        color: var(--text-primary);
        font-size: 1.2rem;
    }

    .nav-burger {
        display: flex;
    }

    .nav-burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-burger.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-image-wrapper {
        width: clamp(220px, 60vw, 300px);
        height: clamp(220px, 60vw, 300px);
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .hero-certifications {
        flex-wrap: wrap;
        justify-content: center;
    }

    .timeline::before {
        left: 15px;
    }

    [dir="rtl"] .timeline::before {
        left: auto;
        right: 15px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    [dir="rtl"] .timeline-item {
        padding-left: 0;
        padding-right: 50px;
    }

    .timeline-marker {
        left: 7px;
    }

    [dir="rtl"] .timeline-marker {
        left: auto;
        right: 7px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 3.5rem);
    }

    .hero-stat-number {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .skills-grid,
    .training-cards,
    .achievements-grid,
    .media-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ANIMATION CLASSES
   ======================================== */

/* Elements waiting to be animated - will-change for GPU */
.animate-ready {
    will-change: transform, opacity;
}

/* Hero elements - GSAP controls these, only add will-change */
.hero-badge,
/* .hero-title-line removed - GSAP controls via JS */
.hero-subtitle,
.hero-title,
.hero-stats,
.hero-cta,
.hero-image-wrapper,
.cert-badge,
.hero-scroll {
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
}

/* Glass card 3D tilt effect - GPU accelerated */
.glass-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.glass-card:hover {
    box-shadow: 0 25px 60px rgba(31, 38, 135, 0.25);
}

[data-theme="dark"] .glass-card:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

/* Shimmer effect for achievement cards */
.achievement-card.gold-glow {
    overflow: hidden;
}

.achievement-card.gold-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 40%,
            rgba(255, 215, 0, 0.15) 50%,
            transparent 60%);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.achievement-card.gold-glow:hover::after {
    transform: translateX(100%) rotate(45deg);
}

/* Timeline progressive line animation */
.timeline::before {
    transform-origin: top;
    animation: drawLine 1.5s ease-out forwards;
}

@keyframes drawLine {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

/* Timeline marker pulse */
.timeline-marker {
    animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(124, 58, 237, 0);
    }
}

/* Floating animation for certification badges */
.cert-badge {
    animation: floatBadge 3s ease-in-out infinite;
}

.cert-badge:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes floatBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Skill card icon bounce on hover */
.skill-card:hover .skill-icon {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(-5px);
    }

    70% {
        transform: translateY(-8px);
    }
}

/* Section tag bounce animation */
.section-tag {
    transition: transform 0.3s ease;
}

.section-tag:hover {
    transform: scale(1.05);
}

/* Social link bounce */
.social-link {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Nav link active indicator */
.nav-link.active {
    color: var(--accent-gold) !important;
}

.nav-link.active::after {
    width: 100%;
}

/* Gradient text animation for hero */
.hero-title-accent {
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Footer elements */
.footer-brand,
.footer-links a {
    will-change: transform, opacity;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-badge,
    .hero-title-line,
    .hero-subtitle,
    .hero-stats,
    .hero-cta,
    .hero-image,
    .cert-badge,
    .glass-card,
    .skill-card,
    .timeline-item,
    .training-card,
    .achievement-card,
    .media-card,
    .education-main,
    .cert-item,
    .contact-card,
    .calendly-wrapper {
        opacity: 1 !important;
        transform: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}