* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0f;
    --bg-secondary: #12121a;
    --purple-primary: #9333ea;
    --purple-secondary: #7c3aed;
    --purple-light: #a855f7;
    --pink: #ec4899;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: rgba(147, 51, 234, 0.2);
    --glass-bg: rgba(18, 18, 26, 0.5);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-dark: #f8f9fa;
    --bg-secondary: #ffffff;
    --purple-primary: #7c3aed;
    --purple-secondary: #9333ea;
    --purple-light: #a855f7;
    --pink: #ec4899;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --border-color: rgba(124, 58, 237, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top right, rgba(147, 51, 234, 0.15), transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(236, 72, 153, 0.15), transparent 50%),
        radial-gradient(ellipse at center, rgba(124, 58, 237, 0.1), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

[data-theme="light"] body::before {
    background: 
        radial-gradient(ellipse at top right, rgba(147, 51, 234, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(236, 72, 153, 0.08), transparent 50%),
        radial-gradient(ellipse at center, rgba(124, 58, 237, 0.05), transparent 50%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--purple-light);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--purple-primary);
}

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

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
}

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

.badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--purple-light);
    border: 2px solid var(--purple-primary);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
    background: var(--purple-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

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

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.25rem;
    transition: all 0.3s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.social-icon:hover {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    transform: translateY(-3px);
}

.social-icon:active {
    transform: translateY(0);
}

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

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--purple-primary);
    box-shadow: 0 0 50px rgba(147, 51, 234, 0.3);
}

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

.floating-badge {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid;
}

.badge-html {
    top: 10%;
    left: 10%;
    color: #00ADD8;
    border-color: #00ADD8;
    animation-delay: 0s;
}

.badge-css {
    top: 15%;
    right: 5%;
    color: #f89820;
    border-color: #f89820;
    animation-delay: 0.5s;
}

.badge-js {
    bottom: 15%;
    left: 5%;
    color: #f0db4f;
    border-color: #f0db4f;
    animation-delay: 1s;
}

.badge-react {
    bottom: 10%;
    right: 10%;
    color: #CE422B;
    border-color: #CE422B;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* About Section */
.about-section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 4rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 50%;
    border: 3px solid var(--purple-primary);
    box-shadow: 0 0 50px rgba(147, 51, 234, 0.3);
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

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

.expertise-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.expertise-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.expertise-card:hover {
    transform: translateX(10px);
    border-color: var(--purple-primary);
}

.expertise-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    border-radius: 10px;
    font-size: 1.5rem;
}

.expertise-card span {
    font-size: 1.125rem;
    font-weight: 500;
}

/* Skills Section */
.skills-section {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(147, 51, 234, 0.05), transparent);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-category {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.skill-category:hover {
    border-color: var(--purple-primary);
    transform: translateY(-5px);
}

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

.skill-header i {
    font-size: 2rem;
    color: var(--purple-light);
}

.skill-header span {
    font-size: 1.25rem;
    font-weight: 600;
}

.skill-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.2);
    transition: all 0.3s;
}

.dot.filled {
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}

/* Languages Section */
.languages-section {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(236, 72, 153, 0.05), transparent);
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.language-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-card:hover {
    border-color: var(--pink);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.1);
}

.language-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 2rem;
    color: white;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.flag-content {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
}

/* USA Flag */
.flag-usa .flag-content {
    flex-direction: column;
}

.usa-stripes {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stripe {
    flex: 1;
}

.stripe.red {
    background: #B22234;
}

.stripe.white {
    background: #FFFFFF;
}

.usa-blue {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 50%;
    background: #3C3B6E;
}

/* Russia Flag */
.flag-russia .flag-content {
    flex-direction: column;
}

.russia-white {
    flex: 1;
    background: #FFFFFF;
}

.russia-blue {
    flex: 1;
    background: #0052CC;
}

.russia-red {
    flex: 1;
    background: #CC0000;
}

/* France Flag */
.flag-france .flag-content {
    flex-direction: row;
}

.france-blue {
    flex: 1;
    background: #0055A4;
}

.france-white {
    flex: 1;
    background: #FFFFFF;
}

.france-red {
    flex: 1;
    background: #EF4135;
}

/* Morocco Flag */
.flag-morocco .flag-content {
    background: #C1272D;
    align-items: center;
    justify-content: center;
}

.morocco-red {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #C1272D;
}

.morocco-star {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    top: -10px;
}

.morocco-star svg {
    width: 100%;
    height: 100%;
}

.language-info {
    flex: 1;
}

.language-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.language-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.language-level.native {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.language-level.intermediate {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.language-level.elementary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.language-progress {
    width: 100%;
    height: 6px;
    background: rgba(147, 51, 234, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--pink), var(--purple-primary));
    border-radius: 3px;
    transition: width 0.8s ease;
    animation: progressAnimation 2s ease-out;
}

@keyframes progressAnimation {
    from {
        width: 0;
    }
}

/* Education Section */
.education-section {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(147, 51, 234, 0.05), transparent);
}

.education-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--purple-primary), var(--pink));
}

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

.education-item:last-child {
    margin-bottom: 0;
}

.education-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    border-radius: 50%;
    font-size: 2rem;
    color: white;
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.4);
}

.education-content {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.education-content:hover {
    transform: translateX(10px);
    border-color: var(--purple-primary);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.education-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.education-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--purple-light);
    white-space: nowrap;
}

.education-institution {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-institution i {
    color: var(--purple-light);
}

.education-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.education-location i {
    color: var(--purple-light);
}

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

.education-highlights {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.education-highlights li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.education-highlights li i {
    color: var(--purple-light);
    font-size: 0.85rem;
}

/* Experience Section */
.experience-section {
    padding: 100px 0;
}

.experience-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--purple-primary), var(--pink));
}

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

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    border-radius: 50%;
    font-size: 2rem;
    color: white;
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.4);
}

.experience-content {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.experience-content:hover {
    transform: translateX(10px);
    border-color: var(--purple-primary);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.experience-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--purple-light);
    white-space: nowrap;
}

.experience-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.experience-company i {
    color: var(--purple-light);
}

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

.experience-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.experience-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.experience-highlights li i {
    color: var(--purple-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--purple-primary);
    color: white;
    border-color: var(--purple-primary);
}

.filter-btn:active {
    transform: scale(0.95);
}

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

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--purple-primary);
    box-shadow: 0 20px 40px rgba(147, 51, 234, 0.3);
}

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--purple-light);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--purple-light);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: var(--purple-primary);
    transform: translateY(-2px);
}

.tech-badge i {
    font-size: 0.85rem;
}

.project-buttons {
    display: flex;
    gap: 1rem;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: linear-gradient(180deg, transparent, rgba(147, 51, 234, 0.05));
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: -2rem auto 4rem;
}

.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.contact-info-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-primary), var(--pink));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.contact-info-card:hover::before {
    transform: scaleX(1);
}

.contact-info-card:hover {
    transform: translateY(-5px);
    border-color: var(--purple-primary);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3);
}

.contact-info-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    border-radius: 50%;
    font-size: 1.75rem;
    color: white;
    transition: all 0.3s ease;
}

.contact-info-card:hover .contact-info-icon {
    transform: rotateY(360deg);
}

.contact-info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--purple-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    gap: 0.75rem;
    color: var(--pink);
}

.contact-link i {
    transition: transform 0.3s ease;
}

.contact-link:hover i {
    transform: translateX(3px);
}

.contact-form-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.contact-form {
    max-width: 100%;
}

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

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--purple-light);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(10, 10, 15, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--purple-primary);
    background: rgba(10, 10, 15, 0.8);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

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

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit span,
.btn-submit i {
    position: relative;
    z-index: 1;
}

.form-success {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 15px;
    border: 2px solid var(--purple-primary);
}

.form-success i {
    font-size: 4rem;
    color: var(--purple-light);
    margin-bottom: 1rem;
    display: block;
    animation: scaleIn 0.5s ease;
}

.form-success h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-success p {
    color: var(--text-secondary);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.contact-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.3s;
}

.contact-icon:hover {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    transform: translateY(-5px);
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.footer-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: var(--purple-light);
}

/* Engagement Card */
.engagement-card {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 999;
    max-width: 90%;
}

.engagement-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-primary), var(--pink));
    border-radius: 15px;
    font-size: 1.5rem;
}

.engagement-info h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.engagement-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.engagement-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.engagement-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive Design */

/* Large Tablets and Small Desktops (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text h2 {
        font-size: 2.25rem;
    }

    .image-wrapper {
        width: 350px;
        height: 350px;
    }

    .about-content {
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Tablets (768px and below) */
@media (max-width: 968px) {
    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-image,
    .about-image {
        order: -1;
    }

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

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .about-image img {
        margin: 0 auto;
    }

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

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

    .language-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-dark);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

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

    .nav-actions {
        gap: 0.75rem;
    }

    .hamburger {
        display: flex;
    }

    .engagement-card {
        flex-direction: column;
        text-align: center;
        bottom: 20px;
        padding: 1rem;
        width: 90%;
    }

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

    .expertise-cards {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Small Tablets and Large Phones (600px and below) */
@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }

    .hero-section {
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 50px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text h2 {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .image-wrapper {
        width: 280px;
        height: 280px;
    }

    .floating-badge {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .badges {
        justify-content: center;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .about-section,
    .skills-section,
    .languages-section,
    .projects-section,
    .contact-section,
    .education-section,
    .experience-section {
        padding: 60px 0;
    }

    .language-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .language-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .morocco-star {
        width: 20px;
        height: 20px;
    }

    .language-info h3 {
        font-size: 1.125rem;
    }

    .language-level {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .expertise-card {
        padding: 1.25rem;
    }

    .expertise-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .expertise-card span {
        font-size: 1rem;
    }

    .education-timeline::before {
        left: 30px;
    }

    .education-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        font-size: 1.5rem;
    }

    .education-content {
        padding: 1.5rem;
    }

    .education-header h3 {
        font-size: 1.25rem;
    }

    .education-institution {
        font-size: 1rem;
    }

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

    .experience-timeline::before {
        left: 30px;
    }

    .experience-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        font-size: 1.5rem;
    }

    .experience-content {
        padding: 1.5rem;
    }

    .experience-header h3 {
        font-size: 1.25rem;
    }

    .experience-company {
        font-size: 1rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .skill-header i {
        font-size: 1.5rem;
    }

    .skill-header span {
        font-size: 1rem;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

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

    .project-image {
        height: 200px;
    }

    .project-info {
        padding: 1.5rem;
    }

    .project-buttons {
        flex-direction: column;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .form-header h3 {
        font-size: 1.5rem;
    }

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

    .form-group input,
    .form-group textarea {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

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

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

    .engagement-card {
        padding: 1rem;
        gap: 1rem;
        bottom: 10px;
    }

    .engagement-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .engagement-info h4 {
        font-size: 0.875rem;
    }

    .engagement-stats,
    .engagement-info p {
        font-size: 0.75rem;
    }
}

/* Extra Small Devices (400px and below) */
@media (max-width: 400px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 1.5rem;
    }

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

    .image-wrapper {
        width: 240px;
        height: 240px;
    }

    .floating-badge {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .social-links {
        width: 100%;
        justify-content: center;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .contact-form {
        padding: 1.5rem 1rem;
    }

    .engagement-card {
        font-size: 0.875rem;
        max-width: 95%;
    }

    .filter-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .project-filters {
        gap: 0.5rem;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 50px;
    }

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

    .floating-badge {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .about-section,
    .skills-section,
    .projects-section,
    .contact-section {
        padding: 60px 0;
    }
}

/* High Resolution Displays */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-text h1 {
        font-size: 4rem;
    }

    .hero-text h2 {
        font-size: 3rem;
    }

    .image-wrapper {
        width: 450px;
        height: 450px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hamburger,
    .engagement-card {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero-section {
        padding-top: 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .social-icon:hover,
    .contact-icon:hover,
    .filter-btn:hover {
        transform: none;
    }

    .project-card:hover {
        transform: none;
    }

    .project-card:hover .project-image img {
        transform: none;
    }

    .skill-category:hover,
    .expertise-card:hover {
        transform: none;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.no-scroll {
    overflow: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--purple-primary);
    color: white;
}

::-moz-selection {
    background: var(--purple-primary);
    color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-light);
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--purple-primary);
    outline-offset: 2px;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
