:root {
    --primary-color: #000000;
    --primary-dark: #000000;
    --secondary-color: #000000;
    --accent-color: #000000;
    --bg-color: #f5f2eb;
    --text-color: #1a1a1a;
    --text-light: #555555;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);

    --nav-height: 70px;
    --transition-speed: 0.3s;
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* Base Typography - Three Main Types */

/* 1. Serif for Paragraphs & Long Content */
body,
p,
.text-serif {
    font-family: 'Tienne', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* 2. Normal Sans-Serif for Buttons, Subtitles, UI */
.nav-link,
.btn,
.social-icon,
.social-big-btn,
.job-role,
.duration-badge,
.skill-tag,
.project-context,
.overlay-text,
h4,
h5,
h6,
label,
input,
textarea,
.footer,
.text-sans {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1rem;
}

/* 3. Large Sans-Serif for Main Titles */
h1,
h2,
h3,
.text-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-color);
}

body {
    background-color: var(--bg-color);
    overflow-x: hidden;
    padding-top: var(--nav-height);
    /* Prevent content from hiding behind fixed nav */
}

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

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

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    transition: all var(--transition-speed);
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 10px;
}

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

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

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(245, 242, 235, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-container {
    display: flex;
    gap: 30px;
    padding: 10px 30px;
    background-color: #ffffff;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Home Section */
.home-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.profile-area h1 {
    font-size: 4rem;
    /* Legerement augmenté pour le "gros" sans-serif */
    margin-bottom: 0.5rem;
}

.bio-text {
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
}

.social-links-home {
    margin-top: 2rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    margin-right: 20px;
}

.social-icon:hover {
    color: var(--primary-color);
}

.media-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.video-wrapper.full-width {
    grid-column: 1 / -1;
    /* Take full width of the grid */
    max-width: 800px;
    /* Don't let it become TOO huge */
    margin: 2rem auto 0;
    /* Center it horizontally */
    box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cv-wrapper {
    text-align: center;
    background: var(--white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
}

.cv-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.cv-img-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.cv-img-container img {
    transition: filter 0.3s ease;
}

.cv-img-container:hover img {
    filter: brightness(0.7);
}

.cv-img-container:hover .project-overlay {
    opacity: 1;
}

.btn-small {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-small:hover {
    text-decoration: underline;
}

/* Experience Section */
.experience-section {
    background-color: var(--white);
}

.experience-card {
    background-color: var(--bg-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
    max-width: 1000px;
    margin: 0 auto;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1.5rem;
}

.company-name {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.job-role {
    font-size: 1.1rem;
    color: var(--text-light);
}

.duration-badge {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
}

.exp-summary {
    margin-bottom: 3rem;
}

.exp-summary p {
    margin-bottom: 1.2rem;
}

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

.exp-skill-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
}

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

.exp-skill-item h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exp-skill-item p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.exp-skill-item.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .experience-card {
        padding: 2rem;
    }

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

    .company-name {
        font-size: 1.8rem;
    }
}

/* Skills Section */
.skills-section {
    background-color: #fdfdfd;
}

/* Projects Section */
.projects-section {
    background-color: var(--white);
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
    background-color: var(--bg-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform var(--transition-speed);
}

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

.project-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
    display: block;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-text {
    color: white;
    font-size: 1.2rem;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 50px;
}

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

.project-image:hover img {
    filter: brightness(0.7);
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.project-context {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-desc {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.skills-list,
.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.skills-list {
    margin-bottom: 1.5rem;
}

.skill-tag {
    background-color: #000000;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tool-badge {
    border: 1px solid #cbd5e1;
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Contact Section */
.contact-container {
    max-width: 1000px;
}

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

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

.social-big-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.social-big-btn:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.form-wrapper {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.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);
}

.submit-btn {
    width: 100%;
}

#form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.success-msg {
    color: #10b981;
}

.error-msg {
    color: #ef4444;
}

.footer,
.footer p {
    text-align: center;
    padding: 3rem 0;
    background-color: #000000;
    color: #ffffff !important;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
}

/* Image Modal (Lightbox) */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    cursor: zoom-out;
    display: none;
    /* Controlled by JS */
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.project-image img {
    cursor: zoom-in;
}

/* Responsive Design */
@media (max-width: 968px) {
    .home-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .profile-area h1 {
        font-size: 2.5rem;
    }

    .bio-text {
        margin: 0 auto 2.5rem;
    }

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

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

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

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .nav-container {
        padding: 10px 15px;
        gap: 10px;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

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