/* Variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --text-color: #374151;
    --text-light: #6b7280;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --max-width: 1200px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --dark-color: #f3f4f6;
    --light-color: #1f2937;
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --white: #111827;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
}
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --text-color: #374151;
    --text-light: #6b7280;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
    transition: var(--transition);
    text-transform: none;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

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

.btn i {
    margin-left: 0.5rem;
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    font-weight: 800;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Navigation */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

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

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Navigation */
nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    padding: 0.75rem 0;
}

[data-theme="dark"] nav {
    background-color: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--gray-700);
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

[data-theme="dark"] .nav-links a {
    color: var(--gray-300);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgzMSwgNDEsIDk1LCAwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.5;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--white);
}

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

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.about-details {
    margin-top: 2.5rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.detail-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.detail-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--gray-500);
}

.about-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 100%;
    min-height: 400px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.1);
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background-color: var(--gray-50);
}

[data-theme="dark"] .skills {
    background-color: var(--gray-900);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .skill {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.skill:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.skill h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.skill p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    min-height: 4.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skill-tags span {
    background-color: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

[data-theme="dark"] .skill-tags span {
    background-color: var(--gray-700);
    color: var(--gray-200);
}

/* Experience Section */
.experience {
    padding: 6rem 0;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .experience {
    background-color: var(--gray-900);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 70px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 70px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--white);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -12px;
}

.timeline-item:nth-child(even)::after {
    left: -12px;
}

.timeline-date {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.timeline-content {
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .timeline-content {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.timeline-content h4 {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.timeline-content ul {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
    position: relative;
    padding-left: 1.5rem;
}

.timeline-content li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: var(--gray-50);
}

[data-theme="dark"] .projects {
    background-color: var(--gray-900);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmin(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    height: 100%;
}

[data-theme="dark"] .project-card {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.project-card h3 {
    font-size: 1.25rem;
    margin: 1.5rem 1.5rem 0.5rem;
    color: var(--dark-color);
}

[data-theme="dark"] .project-card h3 {
    color: var(--gray-100);
}

.project-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--gray-600);
    flex-grow: 1;
    margin: 0;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.5rem 1.5rem;
}

.project-tags span {
    background-color: var(--primary-50);
    color: var(--primary-700);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

[data-theme="dark"] .project-tags span {
    background-color: var(--primary-900);
    color: var(--primary-200);
}

.project-links {
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem 1.5rem;
    margin-top: auto;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: var(--primary-color);
    transition: var(--transition);
}

.project-links a i {
    margin-left: 0.5rem;
    transition: var(--transition);
}

.project-links a:hover {
    color: var(--primary-dark);
}

.project-links a:hover i {
    transform: translateX(3px);
}

/* Publications Section */
.publications {
    padding: 6rem 0;
    background-color: var(--white);
}

[data-theme="dark"] .publications {
    background-color: var(--gray-900);
}

.publications-list {
    margin-top: 3rem;
}

.publication-item {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .publication-item {
    border-bottom-color: var(--gray-700);
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

[data-theme="dark"] .publication-icon {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

.publication-content {
    flex-grow: 1;
}

.publication-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

[data-theme="dark"] .publication-content h3 {
    color: var(--gray-100);
}

.publication-journal {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.publication-authors {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    font-style: italic;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: var(--primary-color);
    transition: var(--transition);
}

.publication-link i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: var(--transition);
}

.publication-link:hover {
    color: var(--primary-dark);
}

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

/* Teaching Section */
.teaching {
    padding: 6rem 0;
    background-color: var(--gray-50);
}

[data-theme="dark"] .teaching {
    background-color: var(--gray-900);
}

.teaching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.teaching-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    text-align: center;
}

[data-theme="dark"] .teaching-card {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.teaching-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.teaching-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    font-size: 2rem;
    transition: var(--transition);
}

.teaching-card:hover .teaching-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.teaching-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 1rem;
}

[data-theme="dark"] .teaching-card h3 {
    color: var(--gray-100);
}

.teaching-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.teaching-card ul {
    text-align: left;
    margin-top: 1.5rem;
}

.teaching-card li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--gray-600);
}

[data-theme="dark"] .teaching-card li {
    color: var(--gray-300);
}

.teaching-card li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .contact {
    background-color: var(--gray-900);
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgzMSwgNDEsIDk1LCAwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.5;
    z-index: 0;
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .contact-container {
    background-color: var(--gray-800);
    border: 1px solid var(--gray-700);
}

.contact form {
    padding: 3rem;
}

.contact h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

[data-theme="dark"] .contact h3 {
    color: var(--gray-100);
}

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

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

[data-theme="dark"] .form-group label {
    color: var(--gray-300);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--gray-800);
}

[data-theme="dark"] .form-control {
    background-color: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-100);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.contact-info {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsIDI1NSwgMjU1LCAwLjA1KSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.5;
    z-index: 0;
}

.contact-info > * {
    position: relative;
    z-index: 1;
}

.contact-info h3 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.contact-info p {
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.7;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.contact-item-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: white;
}

.contact-item-content p,
.contact-item-content a {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    transition: var(--transition);
}

.contact-item-content a:hover {
    color: white;
    text-decoration: underline;
}

.social-links {
    margin-top: 3rem;
}

.social-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
}

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

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

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

/* Footer */
footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: 5rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.footer-about h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-about p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer-links h3,
.footer-contact h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition);
    display: inline-block;
    position: relative;
    padding-left: 1.5rem;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-10px);
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-contact p {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer-contact i {
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    border: none;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: translateY(-3px);
    background-color: var(--primary-dark);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) {
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-item::after {
        left: 18px !important;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .publication-item {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .publication-icon {
        margin: 0 auto;
    }
    
    .publication-content {
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-about h3::after,
    .footer-links h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    
    .hero h1 {
        font-size: 2.75rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .skills-container,
    .teaching-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact form {
        padding: 2rem 1.5rem;
    }
    
    .contact-info {
        padding: 2rem 1.5rem;
    }
    
    .back-to-top,
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .theme-toggle {
        left: 1rem;
        bottom: 1rem;
    }
    
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1.25rem;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero h2 {
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .project-card,
    .skill,
    .teaching-card {
        padding: 1.5rem;
    }
    
    .publication-item {
        padding: 1.5rem 0;
    }
    
    .publication-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 0;
    }
    
    .footer-social {
        gap: 0.75rem;
    }
    
    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: none;
    }
    
    .container {
        width: 100%;
        padding: 0;
    }
    
    nav,
    .btn,
    .theme-toggle,
    .back-to-top,
    footer {
        display: none !important;
    }
    
    section {
        padding: 1rem 0 !important;
        margin: 0 !important;
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .contact-info,
    .publication-item,
    .project-card,
    .skill,
    .timeline-item {
        break-inside: avoid;
    }
    
    @page {
        margin: 2cm;
    }
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--gray-300);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    background-color: white;
    bottom: 3px;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    transition: .4s;
    width: 18px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
}

.slider .sun {
    left: 6px;
    color: #f1c40f;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slider .moon {
    right: 6px;
    color: #f1c40f;
    opacity: 1;
    transition: opacity 0.3s ease;
}

input:checked + .slider .sun {
    opacity: 1;
}

input:checked + .slider .moon {
    opacity: 0;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--gray-800);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* Section Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.hero h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Section À Propos */
.about {
    padding: 6rem 0;
    background-color: var(--white);
}

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

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

.about-image {
    position: relative;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Section Compétences */
.skills {
    padding: 6rem 0;
    background-color: #f9fafb;
}

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

.skill {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.skill p {
    color: var(--text-light);
}

/* Section Projets */
.projects {
    padding: 6rem 0;
    background-color: var(--white);
}

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

.project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--dark-color);
}

.project-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
}

.project-card .btn {
    margin: 0 1.5rem 1.5rem;
    display: inline-block;
}

/* Section Contact */
.contact {
    padding: 6rem 0;
    background-color: #f9fafb;
}

.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    color: var(--primary-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

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

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

/* Pied de page */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Styles responsifs */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}
