/* ===== VARIABLES ===== */
:root {
    /* Dark Theme */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.4);
    --bg-card-hover: rgba(30, 41, 59, 0.6);
    --border-color: rgba(71, 85, 105, 0.3);
    --border-hover: rgba(71, 85, 105, 0.5);

    --text-primary: #f1f5f9;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;

    --accent-primary: #60a5fa;
    --accent-secondary: #3b82f6;

    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.6);

    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6, #1d4ed8);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(248, 250, 252, 0.8);
    --bg-card-hover: rgba(241, 245, 249, 0.9);
    --border-color: rgba(203, 213, 225, 0.5);
    --border-hover: rgba(148, 163, 184, 0.6);

    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);

    --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Alexandria', sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background var(--transition-normal), color var(--transition-normal);
}

/* Language Direction */
[data-lang="ar"] {
    direction: rtl;
}

[data-lang="en"] {
    direction: ltr;
}

/* ===== BACKGROUND ===== */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--gradient-bg);
    transition: background var(--transition-normal);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -1;
    opacity: 0.03;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    transition: opacity var(--transition-normal);
}

[data-theme="light"] .bg-grid {
    opacity: 0.1;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 1;
}

/* ===== CONTENT VISIBILITY ===== */
.content[data-lang="en"] {
    display: none;
}

body[data-lang="en"] .content[data-lang="ar"] {
    display: none;
}

body[data-lang="en"] .content[data-lang="en"] {
    display: block;
}

/* ===== TOP CONTROLS ===== */
.top-controls {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-end;
}

/* Language Switcher */
.simple-language-switcher {
    display: flex;
    gap: 8px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 8px 32px var(--shadow-light);
}

.lang-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-family: 'Alexandria', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.3s ease;
    z-index: -1;
}

.lang-btn:hover::before {
    transform: scale(1);
}

.lang-btn:hover {
    color: white;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.lang-btn.active {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.lang-btn.active::before {
    transform: scale(1);
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-text {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Theme Toggle */
.simple-theme-toggle {
    display: flex;
    gap: 8px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 8px 32px var(--shadow-light);
}

.theme-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.theme-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.theme-btn:hover::before {
    transform: scale(1);
}

.theme-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.theme-btn:hover .theme-icon {
    transform: rotate(20deg) scale(1.1);
}

.theme-btn.active {
    background: var(--gradient-accent);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.theme-btn.active::before {
    transform: scale(1);
}

.theme-btn .theme-icon {
    font-size: 1.8em;
    transition: all var(--transition-normal);
    filter: drop-shadow(0 2px 4px var(--shadow-light));
}

.theme-btn:active {
    transform: scale(0.95);
}

/* ===== PROGRESS INDICATOR ===== */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--border-color);
    z-index: 1000;
    transition: background var(--transition-normal);
}

.scroll-progress {
    height: 100%;
    background: var(--gradient-accent);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-2xl) 0;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-inline: auto;
}

/* Profile */
.profile-container {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-xl);
}

.profile-ring {
    width: 220px;
    height: 220px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotateRing 20s linear infinite;
    transition: border-color var(--transition-normal);
}

.profile-ring::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: rotateRing 15s linear infinite reverse;
}

@keyframes rotateRing {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px var(--shadow-medium), 0 0 0 8px var(--bg-card);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 80px var(--shadow-heavy), 0 0 0 12px var(--bg-card);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform var(--transition-slow);
}

.profile-img:hover img {
    transform: scale(1.1);
}

/* Typography */
.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin: var(--space-md) 0;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.6));
    }
}

.static-text {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    background: linear-gradient(135deg, var(--text-muted), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: staticGlow 2s ease-in-out infinite alternate;
}

@keyframes staticGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.6));
    }
}

.hero-description {
    font-size: 1.1em;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== STATISTICS ===== */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--space-lg);
    margin: var(--space-2xl) 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    flex: 0 1 calc(25% - var(--space-lg));
    min-width: 150px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px var(--shadow-medium);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--accent-primary);
    display: block;
    margin-bottom: var(--space-sm);
    transition: transform var(--transition-normal);
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
}

.stat-label {
    font-size: 1em;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===== PORTFOLIO CREATIVE SLIDER ===== */
.portfolio-slider-section {
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.portfolio-slider-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
    min-height: 500px;
}

.portfolio-slider {
    position: relative;
    width: unset;
    height: 500px;
    perspective: 1200px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px var(--shadow-medium);
}

/* Ensure RTL doesn't affect slider internals */
[data-lang="ar"] .portfolio-slider {
    direction: ltr;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.slider-slide {
    position: absolute;
    width: 350px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.5s ease,
        filter 0.5s ease;
    transform-style: preserve-3d;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    box-shadow: 0 15px 40px var(--shadow-medium);
    backface-visibility: hidden;
    will-change: transform, opacity, filter;
    /* Center all slides initially */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 18px;
    display: block;
}

.slider-slide:hover {
    box-shadow: 0 20px 50px var(--shadow-heavy);
}

.slider-slide:not(.active):hover {
    filter: blur(1px) brightness(0.9) !important;
    cursor: pointer;
}

.slider-slide.active {
    z-index: 10;
    box-shadow: 0 20px 50px var(--shadow-heavy);
}

.slider-slide.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    border-radius: 18px;
    z-index: 1;
}

/* ===== SLIDER NAVIGATION ===== */
.slider-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-lg);
    pointer-events: none;
    z-index: 20;
}

/* Keep navigation buttons in correct positions for Arabic */
[data-lang="ar"] .slider-navigation {
    direction: ltr;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: all;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 30px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.2s ease;
    z-index: -1;
}

.nav-btn:hover::before {
    transform: scale(1);
}

.nav-btn:hover {
    color: white;
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.nav-btn:hover svg {
    transform: scale(1.2);
}

/* ===== IMAGE MODAL ===== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10001;
    animation: modalZoom 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes modalZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--accent-primary);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--text-primary);
    font-size: 1.5em;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Alexandria', sans-serif;
}

.modal-close:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    padding: var(--space-2xl) 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-2xl);
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-align: center;
    flex: 0 1 500px;
    min-width: 320px;
    max-width: 500px;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 30px 80px var(--shadow-heavy);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--space-lg) auto;
    color: var(--accent-primary);
    transition: all var(--transition-normal);
}

.glass-card:hover .card-icon {
    transform: rotateY(180deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.card-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    transition: color var(--transition-normal);
}

.glass-card:hover .card-title {
    color: var(--accent-primary);
}

.card-description {
    font-size: 1em;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
}

.tech-tag {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.tech-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===== SKILLS AND PLATFORMS ===== */
.skills-platforms-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.skills-section,
.platforms-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: var(--space-xl);
    transition: all var(--transition-normal);
    flex: 0 1 500px;
    min-width: 320px;
    max-width: 600px;
}

.skills-section:hover,
.platforms-section:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px var(--shadow-medium);
}

.subsection-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.subsection-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.2em;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--space-md);
}

.skill-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-md) var(--space-sm);
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    flex: 0 1 150px;
    min-width: 130px;
    max-width: 160px;
}

.skill-icon {
    font-size: 1.5em;
    margin-bottom: 4px;
    transition: transform var(--transition-normal);
}

.skill-item:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    transition: left 0.5s ease;
    z-index: -1;
}

.skill-item:hover::before {
    left: 0;
}

.skill-item:hover {
    transform: translateY(-6px) rotateZ(2deg);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.platforms-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--space-lg);
}

.platform-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    flex: 0 1 140px;
    min-width: 120px;
    max-width: 160px;
}

.platform-item:hover {
    transform: translateY(-8px) scale(1.05);
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 20px 50px var(--shadow-medium);
}

.platform-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform var(--transition-normal);
}

.platform-item:hover .platform-logo {
    transform: rotateY(360deg) scale(1.2);
}

.platform-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== SERVICES ===== */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.service-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex: 0 1 450px;
    min-width: 320px;
    max-width: 450px;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.8s ease;
}

.service-item:hover::before {
    left: 100%;
}

.service-item:hover {
    transform: translateX(12px);
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

body[data-lang="en"] .service-item:hover {
    transform: translateX(-12px);
}

.service-icon {
    font-size: 1.8em;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-primary);
    transition: all var(--transition-normal);
}

.service-item:hover .service-icon {
    transform: rotateY(180deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    transition: color var(--transition-normal);
}

.service-item:hover .service-title {
    color: var(--accent-primary);
}

.service-desc {
    font-size: 0.95em;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.cta-section {
    text-align: center;
    padding: var(--space-2xl) 0;
    position: relative;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-subtitle {
    font-size: 1.2em;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    text-decoration: none;
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: 700;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.cta-button::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.8s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button.primary {
    background: var(--gradient-accent);
    color: white;
}

.cta-button.primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.4);
}

.cta-icon {
    font-size: 1em;
    transition: transform var(--transition-normal);
}

.cta-button:hover .cta-icon {
    transform: translateX(6px);
}

body[data-lang="en"] .cta-button:hover .cta-icon {
    transform: translateX(-6px);
}

/* ===== FLOATING CONTACT ===== */
.floating-contact {
    position: fixed;
    right: var(--space-lg);
    bottom: var(--space-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

body[data-lang="en"] .floating-contact {
    left: var(--space-lg);
    right: auto;
}

.contact-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.8em;
    box-shadow: 0 8px 30px var(--shadow-medium);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.contact-btn:hover::before {
    transform: scale(1);
}

.contact-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 15px 50px var(--shadow-heavy);
}

.contact-btn:active {
    transform: scale(0.95);
}

.linkedin-btn {
    background: linear-gradient(135deg, #0077B5, #005885);
}

.linkedin-btn:hover {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #2EE371, #149688);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .top-controls {
        top: var(--space-md);
        right: var(--space-md);
        gap: var(--space-sm);
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .floating-contact {
        right: var(--space-md);
        bottom: var(--space-md);
    }

    body[data-lang="en"] .floating-contact {
        left: var(--space-md);
        right: auto;
    }

    .contact-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }

    .stats-container {
        gap: var(--space-md);
    }

    .stat-card {
        flex: 0 1 calc(50% - var(--space-md));
        min-width: 140px;
        max-width: 200px;
    }

    .cards-grid {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }

    .glass-card {
        flex: none;
        width: 100%;
        max-width: 400px;
        min-width: auto;
    }

    .skills-platforms-container {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }

    .skills-section,
    .platforms-section {
        flex: none;
        width: 100%;
        max-width: 500px;
        min-width: auto;
    }

    .skills-grid {
        justify-content: center;
        gap: var(--space-sm);
    }

    .skill-item {
        flex: 0 1 120px;
        min-width: 100px;
        padding: var(--space-sm);
    }

    .platforms-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: var(--space-md);
        margin: 0 auto;
        max-width: 100%;
    }

    .platform-item {
        flex: 0 1 120px;
        min-width: 100px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .services-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        gap: var(--space-md);
    }

    .service-item {
        flex: 0 1 calc(50% - var(--space-md));
        width: auto;
        max-width: 300px;
        min-width: 280px;
        flex-direction: row;
        text-align: left;
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .service-icon {
        font-size: 1.5em;
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .service-title {
        font-size: 1.1em;
    }

    .service-desc {
        font-size: 0.9em;
    }

    /* Portfolio Slider Mobile */
    .portfolio-slider {
        height: 400px;
        margin: 0 var(--space-sm);
    }

    .slider-slide {
        width: 280px;
        height: 320px;
    }

    .slider-navigation {
        padding: 0 var(--space-sm);
    }

    .nav-btn {
        width: 50px;
        height: 50px;
    }

    .nav-btn svg {
        width: 20px;
        height: 20px;
    }

    .modal-close {
        top: -40px;
        right: -40px;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-container {
        gap: var(--space-sm);
        padding: 0 var(--space-sm);
    }

    .stat-card {
        flex: 0 1 calc(50% - var(--space-sm));
        min-width: 120px;
        max-width: 160px;
        padding: var(--space-lg) var(--space-sm);
    }

    .skill-item {
        flex: 0 1 100px;
        min-width: 80px;
        padding: var(--space-sm) 8px;
        font-size: 0.8em;
    }

    .platforms-grid {
        justify-content: center;
        gap: var(--space-sm);
        padding: 0 var(--space-sm);
    }

    .platform-item {
        flex: 0 1 100px;
        min-width: 90px;
        max-width: 120px;
    }

    .services-grid {
        flex-direction: column;
        align-items: center;
    }

    .service-item {
        flex: none;
        width: 100%;
        max-width: 350px;
        min-width: auto;
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .service-icon {
        margin: 0 auto;
    }

    /* Portfolio Slider Extra Small */
    .portfolio-slider {
        height: 348px;
    }

    .slider-slide {
        width: 240px;
        height: 280px;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 85vh;
    }

    .modal-close {
        top: -35px;
        right: -35px;
        width: 35px;
        height: 35px;
    }
}

/* Allow selection for input fields only */
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Hide scrollbars to prevent content theft */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {

    .top-controls,
    .scroll-indicator,
    .floating-contact,
    .bg-canvas,
    .bg-grid,
    .image-modal,
    .portfolio-slider-section {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .glass-card,
    .stat-card,
    .service-item {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}