/* ============================================
   ALAADIN'S PROFESSIONAL PORTFOLIO
   Main Stylesheet with Theme & RTL Support
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (THEMES)
   ============================================ */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: rgba(26, 35, 50, 0.8);
    --bg-glass: rgba(17, 24, 39, 0.7);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.4);

    --border-color: rgba(99, 102, 241, 0.2);
    --border-glow: rgba(139, 92, 246, 0.3);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);

    /* Animation & Transition */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Layout */
    --header-height: 80px;
    --container-max: 1400px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;

    /* Typography */
    --font-primary: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    --font-arabic: 'Cairo', 'Noto Sans Arabic', 'Poppins', sans-serif;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.9);

    --text-primary: #1e1b4b;
    --text-secondary: #374151;
    --text-muted: #6b7280;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.25);

    --border-color: rgba(99, 102, 241, 0.2);
    --border-glow: rgba(139, 92, 246, 0.25);

    --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.08);
    --shadow-md: 0 4px 20px rgba(99, 102, 241, 0.12);
    --shadow-lg: 0 10px 40px rgba(99, 102, 241, 0.15);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.12);
}

/* RTL Support */
[dir="rtl"] {
    --font-primary: var(--font-arabic);
    direction: rtl;
    text-align: right;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 0% 0%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

ul,
ol {
    list-style: none;
}

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

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

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    position: relative;
}

.section-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.1;
    border-radius: 50px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-title .gradient-text {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-glow);
}

/* Gradient Text */
.gradient-text {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

.logo-text {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    position: relative;
    transition: all var(--transition-fast);
}

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

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

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

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 4px;
    gap: 0;
}

.lang-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.lang-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

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

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

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

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
}

.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(10, 15, 26, 0.8) 50%, var(--bg-primary) 100%);
}

/* Animated Particles */
.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 8s infinite ease-in-out;
    box-shadow: 0 0 20px var(--accent-glow);
}

@keyframes float {

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

    25% {
        transform: translateY(-30px) translateX(10px);
        opacity: 0.6;
    }

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

    75% {
        transform: translateY(-25px) translateX(5px);
        opacity: 0.5;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
}

.hero-greeting {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.hero-greeting .wave {
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
    display: inline-block;
}

@keyframes wave {

    0%,
    60%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-title-wrapper {
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.hero-title .typing-text {
    display: inline-block;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 0 60px var(--accent-glow);
}

.typing-cursor {
    display: inline-block;
    font-weight: 200;
    color: var(--accent-primary);
    animation: cursor-blink 0.8s step-end infinite;
    font-size: 1em;
    margin-left: 4px;
    opacity: 0.9;
}

@keyframes cursor-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.hero-stats {
    display: flex;
    gap: 0;
    margin-top: 3rem;
    position: relative;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    position: relative;
    flex: 1;
    transition: all 0.3s ease;
}

/* Gradient divider between stats */
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background: linear-gradient(180deg,
            transparent 0%,
            var(--accent-primary) 50%,
            transparent 100%);
    opacity: 0.3;
}

.stat-item:hover {
    transform: translateY(-3px);
}

/* Icon wrapper - hidden on desktop, icons inline with number */
.stat-icon-wrapper {
    display: none;
}

.stat-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Small icon inline with number */
.stat-content::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--accent-primary);
    opacity: 0.7;
}

.stat-item:nth-child(1) .stat-content::before {
    content: "\f073";
}

/* calendar */
.stat-item:nth-child(2) .stat-content::before {
    content: "\f126";
}

/* code-branch */
.stat-item:nth-child(3) .stat-content::before {
    content: "\f51c";
}

/* chalkboard */
.stat-item:nth-child(4) .stat-content::before {
    content: "\f0c0";
}

/* users */

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-plus {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 1px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Hero Image */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero-image-border {
    position: absolute;
    inset: -15px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
    opacity: 0.5;
}

.hero-image-border::before,
.hero-image-border::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-glow);
}

.hero-image-border::before {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-image-border::after {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

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

.hero-image-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-lg), 0 0 60px var(--accent-glow);
}

.hero-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating Tech Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--accent-primary);
    font-size: 1.25rem;
    animation: floatIcon 4s infinite ease-in-out;
    box-shadow: var(--shadow-md);
}

.floating-icon:nth-child(1) {
    top: 10%;
    left: -20%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 30%;
    right: -20%;
    animation-delay: 1s;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    left: -25%;
    animation-delay: 2s;
}

.floating-icon:nth-child(4) {
    bottom: 10%;
    right: -15%;
    animation-delay: 0.5s;
}

@keyframes floatIcon {

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

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

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

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

.about-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.1;
    z-index: 1;
}

.about-image-wrapper img {
    width: 100%;
    height: auto;
    transition: transform var(--transition-slow);
}

.about-image-wrapper:hover img {
    transform: scale(1.05);
}

.about-experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 140px;
    height: 140px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-experience-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.badge-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease, transform 0.5s ease;
    width: 100%;
    padding: 0.5rem;
}

.badge-content.active {
    opacity: 1;
    transform: scale(1);
}

.about-experience-badge .number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.about-experience-badge .number i {
    font-size: 1.75rem;
}

.about-experience-badge .text {
    font-size: 0.65rem;
    text-align: center;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.highlight-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 1rem;
}

.highlight-text {
    font-weight: 500;
    font-size: 0.9375rem;
}

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

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.3;
}

[dir="rtl"] .experience-timeline::before {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.experience-item {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
}

.experience-item:nth-child(even) {
    flex-direction: row-reverse;
}

[dir="rtl"] .experience-item:nth-child(even) {
    flex-direction: row;
}

[dir="rtl"] .experience-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.experience-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-glow);
    z-index: 2;
}

[dir="rtl"] .experience-marker {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.experience-date {
    flex: 0 0 180px;
    text-align: right;
    padding-top: 1.5rem;
}

.experience-item:nth-child(even) .experience-date {
    text-align: left;
}

[dir="rtl"] .experience-date {
    text-align: left;
}

[dir="rtl"] .experience-item:nth-child(even) .experience-date {
    text-align: right;
}

.experience-date span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.experience-card {
    flex: 1;
    padding: 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

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

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-glow);
}

.experience-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.experience-logo {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.experience-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.experience-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.experience-info h4 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--accent-primary);
}

.experience-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Experience Card Link Styles */
a.experience-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.experience-link:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
    border-color: var(--accent-primary);
}

.experience-arrow {
    margin-left: auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--accent-primary);
    transition: all var(--transition-fast);
    opacity: 0.7;
}

[dir="rtl"] .experience-arrow {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .experience-arrow i {
    transform: rotate(180deg);
}

a.experience-link:hover .experience-arrow {
    background: var(--accent-gradient);
    color: white;
    opacity: 1;
    transform: translateX(5px);
}

[dir="rtl"] a.experience-link:hover .experience-arrow {
    transform: translateX(-5px);
}

/* ============================================
   EDUCATION SECTION
   ============================================ */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.education-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.education-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-glow);
}

.education-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.education-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.education-card:hover .education-image img {
    transform: scale(1.1);
}

.education-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 60%);
}

.education-content {
    padding: 1.5rem;
    position: relative;
    margin-top: -60px;
    z-index: 1;
}

.education-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.education-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-container {
    display: grid;
    gap: 3rem;
}

.skills-category {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: all var(--transition-normal);
}

.skills-category:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.skills-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skills-category-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-md);
    color: white;
    font-size: 1.25rem;
}

.skills-category-title {
    font-size: 1.25rem;
    font-weight: 600;
}

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

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: all var(--transition-fast);
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.skill-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: var(--border-radius-sm);
}

.skill-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--accent-glow);
}

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

.project-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-glow);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 15, 26, 0.95) 0%, rgba(10, 15, 26, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

.project-link:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.project-content {
    padding: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50px;
}

.project-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

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

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
}

.contact-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(10px);
    box-shadow: 0 0 20px var(--accent-glow);
}

[dir="rtl"] .contact-card:hover {
    transform: translateX(-10px);
}

.contact-card-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-md);
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-card-text h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.contact-card-text p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

/* Contact Form */
.contact-form {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

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

.footer-newsletter p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: inherit;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

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

/* Back To Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 999;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

    .hero-image {
        order: -1;
    }

    .hero-image-wrapper {
        width: 300px;
        height: 300px;
    }

    .floating-icons {
        display: none;
    }

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

    .about-experience-badge {
        right: 50%;
        transform: translateX(50%);
    }

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

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

@media (max-width: 992px) {
    .experience-timeline::before {
        left: 20px;
    }

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

    .experience-item,
    .experience-item:nth-child(even) {
        flex-direction: column;
        padding-left: 50px;
    }

    [dir="rtl"] .experience-item,
    [dir="rtl"] .experience-item:nth-child(even) {
        padding-left: 0;
        padding-right: 50px;
        flex-direction: column;
    }

    .experience-marker {
        left: 10px;
        transform: none;
    }

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

    .experience-date {
        text-align: left !important;
        flex: none;
        padding-top: 0;
        margin-bottom: 1rem;
    }

    [dir="rtl"] .experience-date {
        text-align: right !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .section {
        padding: 4rem 0;
    }

    .nav-list {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .nav-list.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 1rem;
        width: 100%;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .lang-switcher {
        display: none;
    }

    .hero-image-wrapper {
        width: 250px;
        height: 250px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 0;
        justify-content: center;
    }

    .stat-item {
        padding: 1.25rem 1rem;
        flex: 0 0 50%;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-plus {
        font-size: 1.25rem;
    }

    .stat-content::before {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.55rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero-image-wrapper {
        width: 200px;
        height: 200px;
    }

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

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .skill-item {
        padding: 1rem 0.5rem;
    }
}

/* ============================================
   LIGHT THEME HERO OVERRIDES
   ============================================ */
[data-theme="light"] .hero {
    background: linear-gradient(180deg, #ffffff 0%, #f0f0ff 50%, #e8e8ff 100%);
}

[data-theme="light"] .hero-background::after {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(240, 240, 255, 0.9) 50%,
            rgba(255, 255, 255, 0.95) 100%);
}

[data-theme="light"] .hero-name {
    color: #1e1b4b;
    text-shadow: none;
}

[data-theme="light"] .hero-description {
    color: #374151;
}

[data-theme="light"] .hero-greeting {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .hero-stats .stat-number {
    color: #1e1b4b;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-stats .stat-label {
    color: #4b5563;
}

[data-theme="light"] .particle {
    background: #6366f1;
    opacity: 0.15;
}

[data-theme="light"] .floating-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .hero-image-border::before {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
}

[data-theme="light"] .hero-image-border::after {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
}

[data-theme="light"] .section {
    background: #ffffff;
}

[data-theme="light"] .section:nth-child(even) {
    background: #f8fafc;
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .project-card {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .project-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
}

/* ============================================
   PROJECT CARD AS LINK
   ============================================ */
a.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

a.project-card:hover {
    transform: translateY(-8px);
}

a.project-card h3 {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

a.project-card:hover h3 {
    color: var(--accent-primary);
}

a.project-card p {
    color: var(--text-secondary);
}

a.project-card .project-image {
    overflow: hidden;
}

a.project-card .project-image img {
    transition: transform 0.4s ease;
}

a.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* ============================================
   SUPER WOW MOBILE EXPERIENCE
   ============================================ */

/* Mobile Hero - Clean Layout */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: calc(var(--header-height) + 1rem);
    }

    .hero-content {
        flex-direction: column-reverse;
        gap: 1.5rem;
        text-align: center;
        padding: 1rem 0;
    }

    .hero-text {
        max-width: 100%;
    }

    /* Mobile Image */
    .hero-image {
        order: -1;
    }

    .hero-image-wrapper {
        width: 180px;
        height: 180px;
    }

    /* Mobile Greeting Badge */
    .hero-greeting {
        display: inline-flex;
        justify-content: center;
        margin: 0 auto 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        background: rgba(99, 102, 241, 0.15);
        border: 1px solid rgba(99, 102, 241, 0.3);
    }

    /* Mobile Name */
    .hero-name {
        font-size: clamp(2rem, 10vw, 3rem);
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }

    /* Mobile Title - Centered */
    .hero-title-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1rem;
        margin-bottom: 0;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        white-space: normal;
        text-align: center;
    }

    /* Typing Text - Clean Mobile Design */
    .hero-title .typing-text {
        display: inline-block;
        font-size: clamp(1rem, 4.5vw, 1.2rem) !important;
        background: var(--accent-gradient) !important;
        background-clip: text !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        font-weight: 700;
        letter-spacing: -0.02em;
    }

    /* Typing Cursor */
    .typing-cursor {
        color: var(--accent-primary);
        font-size: 1em;
        margin-left: 2px;
    }

    /* Mobile Description */
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
        color: var(--text-secondary);
    }

    /* Mobile Image - Floating Effect */
    .hero-image {
        order: -1;
        margin-bottom: 1rem;
    }

    .hero-image-wrapper {
        width: 180px;
        height: 180px;
        animation: floatImage 6s ease-in-out infinite;
    }

    @keyframes floatImage {

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

        50% {
            transform: translateY(-15px) scale(1.02);
        }
    }

    .hero-image-inner {
        box-shadow:
            var(--shadow-lg),
            0 0 60px rgba(99, 102, 241, 0.4),
            0 0 100px rgba(139, 92, 246, 0.2);
    }

    .hero-image-border {
        animation: rotate 20s linear infinite;
    }

    /* Mobile Stats */
    .hero-stats {
        background: rgba(17, 24, 39, 0.5);
        border-radius: var(--border-radius-lg);
        border: 1px solid rgba(99, 102, 241, 0.2);
        padding: 0.75rem;
        margin-top: 1.5rem;
    }

    .stat-item {
        padding: 0.75rem 0.5rem;
    }

    /* Mobile Floating Icons - Hidden on mobile for cleaner look */
    .floating-icons {
        display: none;
    }

    /* Mobile Hero Buttons */
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 1rem;
        border-radius: var(--border-radius-lg);
    }

    .hero-buttons .btn-primary {
        box-shadow:
            0 4px 20px rgba(99, 102, 241, 0.4),
            0 8px 40px rgba(99, 102, 241, 0.2);
    }

    .hero-buttons .btn-primary:active {
        transform: scale(0.98);
    }
}

/* Extra Small Devices - Super Compact */
@media (max-width: 480px) {
    .hero {
        padding-top: var(--header-height);
    }

    .hero-content {
        padding: 0.5rem 0;
        gap: 1.5rem;
    }

    .hero-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .hero-greeting {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .hero-name {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
    }

    .hero-title {
        font-size: 0.9rem;
    }

    .hero-title .typing-text {
        font-size: clamp(0.9rem, 4.5vw, 1.1rem) !important;
        padding: 0.5rem 1rem;
    }

    .hero-description {
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }

    .hero-stats {
        padding: 0.75rem;
    }

    .stat-item {
        padding: 0.75rem 0.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-plus {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.5rem;
    }

    .floating-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Mobile About Section - Premium */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-image {
        display: flex;
        justify-content: center;
    }

    .about-image-wrapper {
        max-width: 300px;
        width: 100%;
        border-radius: var(--border-radius-xl);
        box-shadow:
            var(--shadow-lg),
            0 0 40px rgba(99, 102, 241, 0.2);
    }

    .about-experience-badge {
        width: 110px;
        height: 110px;
        bottom: -15px;
        right: 10%;
        box-shadow:
            var(--shadow-lg),
            0 0 30px rgba(99, 102, 241, 0.4);
    }

    .about-experience-badge .number {
        font-size: 1.5rem;
    }

    .about-experience-badge .text {
        font-size: 0.55rem;
    }

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

    .highlight-item {
        justify-content: center;
        padding: 1.25rem;
        background: rgba(17, 24, 39, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .highlight-item:active {
        transform: scale(0.98);
        border-color: var(--accent-primary);
    }
}

/* Mobile Section Titles - Animated */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        position: relative;
    }

    .section-title .gradient-text {
        display: inline-block;
        animation: gradientPulse 3s ease-in-out infinite;
    }

    @keyframes gradientPulse {

        0%,
        100% {
            filter: brightness(1);
        }

        50% {
            filter: brightness(1.2);
        }
    }

    .section-subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Mobile Touch Feedback */
@media (max-width: 768px) {

    .btn,
    .nav-link,
    .project-card,
    .skill-item,
    .experience-card,
    .education-card,
    .highlight-item,
    .social-link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Active states for touch */
    .btn:active,
    .project-card:active,
    .skill-item:active,
    .education-card:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
}

/* Mobile Navigation Enhancements */
@media (max-width: 768px) {
    .header {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background: rgba(10, 15, 26, 0.85);
    }

    .nav-list {
        background: rgba(17, 24, 39, 0.95);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border-bottom: 1px solid rgba(99, 102, 241, 0.2);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .nav-link {
        position: relative;
        overflow: hidden;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--accent-gradient);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

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

/* Mobile Experience Cards */
@media (max-width: 768px) {

    .experience-card,
    a.experience-link {
        padding: 1.5rem;
        border-radius: var(--border-radius-lg);
        background: var(--bg-card);
    }

    .experience-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .experience-logo {
        width: 50px;
        height: 50px;
    }

    .experience-info h3 {
        font-size: 1.1rem;
    }

    .experience-info h4 {
        font-size: 0.85rem;
    }

    .experience-arrow {
        width: 35px;
        height: 35px;
        margin-left: auto;
    }
}

/* Mobile Project Cards - Swipeable Carousel */
@media (max-width: 768px) {
    .projects-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 0.5rem 1rem 1.5rem;
        margin: 0 -1rem;
        scrollbar-width: none;
        /* Firefox */
    }

    .projects-grid::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari */
    }

    .projects-grid .project-card,
    .projects-grid a.project-card {
        flex: 0 0 85%;
        max-width: 85%;
        scroll-snap-align: center;
        background: var(--bg-card);
        border-radius: var(--border-radius-lg);
        overflow: hidden;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1rem;
    }

    .project-content h3 {
        font-size: 1rem;
    }

    /* Scroll indicator dots hint */
    .projects-grid::after {
        content: '';
        flex: 0 0 1rem;
    }
}

/* Mobile Skills - Compact Grid */
@media (max-width: 768px) {
    .skills-category {
        padding: 1.5rem;
        background: var(--bg-card);
    }

    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .skill-item {
        padding: 0.75rem 0.5rem;
        gap: 0.5rem;
    }

    .skill-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .skill-name {
        font-size: 0.7rem;
    }
}

/* Mobile Contact Section */
@media (max-width: 768px) {
    .contact-form {
        padding: 1.5rem;
        background: var(--bg-card);
        border-radius: var(--border-radius-xl);
    }

    .form-control {
        padding: 1rem;
        font-size: 16px;
        /* Prevents zoom on iOS */
        border-radius: var(--border-radius-md);
    }

    .form-control:focus {
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    }
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer {
        background: var(--bg-secondary);
    }

    .footer-content {
        gap: 2rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        background: rgba(99, 102, 241, 0.15);
    }

    .social-link:active {
        transform: scale(0.9);
        background: var(--accent-gradient);
    }

    .footer-title {
        color: var(--text-primary);
    }

    .footer-brand p,
    .footer-links a,
    .footer-newsletter p,
    .footer-bottom p {
        color: var(--text-secondary);
    }

    .newsletter-form input {
        background: var(--bg-card);
        color: var(--text-primary);
        border-color: var(--border-color);
    }
}

/* Smooth Scrolling Container for Mobile */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body {
        overscroll-behavior-y: none;
    }
}

/* iOS Safe Area Support */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .hero {
            padding-bottom: max(2rem, env(safe-area-inset-bottom));
        }

        .footer-bottom {
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
        }

        .back-to-top {
            bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem));
        }
    }
}

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

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