
/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: 'Libre Caslon Text', serif;
    background-color: #fcfaf6;
    color: #333333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding-bottom: 3rem;
}
h1, h2, h3, h4, p, ul {
    margin: 0;
    padding: 0;
}
ul {
    list-style: none;
}
a {
    text-decoration: none;
    color: inherit;
}

/* Utility Classes */
.font-sans-alt {
    font-family: 'Inter', sans-serif;
}

.text-brand {
    color: #0f1c2e;
}

.text-brand-gold {
    color: #c99a4e;
}

.text-brand-muted {
    color: #666666;
}

.text-white {
    color: #ffffff;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.bg-brand {
    background-color: #0f1c2e;
}

.bg-brand-cream {
    background-color: #fcfaf6;
}

.bg-white {
    background-color: #ffffff;
}

.bg-brand-gold {
    background-color: #c99a4e;
}

.uppercase {
    text-transform: uppercase;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600; 
}

.font-medium {
    font-weight: 500; 
}

.italic { 
    font-style: italic; 
}

.text-center { 
    text-align: center; 
}

.text-right { 
    text-align: right; 
}

.text-xs { 
    font-size: 0.75rem; 
    line-height: 1rem; 
}

.text-sm { 
    font-size: 0.875rem; 
    line-height: 1.25rem; 
}

.text-lg { 
    font-size: 1.125rem; 
    line-height: 1.75rem; 
}

.text-xl { 
    font-size: 1.25rem; 
    line-height: 1.75rem; 
}

.text-2xl { 
    font-size: 1.5rem; 
    line-height: 2rem; 
}

.text-3xl { 
    font-size: 1.875rem; 
    line-height: 2.25rem; 
}

/* Layout */
.container {
    max-width: 72rem;
    margin: 2rem auto 0;
    background-color: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 10;
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
}

/* Header */

.header {
    position: relative;
    z-index: 20;
    display:grid;
    grid-template-columns: 28% 47% 25%;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 2rem; 
    }
}

.boussole-img{
    position: relative;
    width: 50%;
    height: 50%;
    left: 27%;
}

.header h1 {
    font-family:'Playfair display', serif;
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0;
}

.header h2 {
    margin-bottom: 1rem;
    font-weight: 400;
}

.header-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.025em;
    margin-bottom: 0;
}

.header-dot {
    width: 0.10rem;
    height: 1rem;
    background-color: #c99a4e;
}

.header-desc {
    max-width: 32rem;
    line-height: 1.625;
}

/* Pour que le h1 avec <br> garde le fond sur les 2 lignes */
.text-brand {
    padding-bottom: 15px;
}

@media (max-width: 992px) {
    .header { 
        grid-template-columns: 1fr; 
        text-align: center;
    }
    .text-brand,
    .header-tags,
    .header-desc {
        margin-left: auto;
        margin-right: auto;
        background: linear-gradient(to bottom, /* sur mobile on fondu vers le bas */
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(255, 255, 255, 0.95) 60%, 
            rgba(255, 255, 255, 0) 100%);
        padding: 10px 20px;
        border-radius: 12px;
    }
}

.circuit-img{
    position: relative;
    width: 100%;
    height: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .contact-info { 
        align-items: flex-start; 
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: #0f1c2e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bgh1-img {
    position: absolute;
    width: 40%; /* 1. Remets une largeur */
    height: 100%; /* 2. Prend toute la hauteur */
    right: 0; /* 3. Colle à droite */
    top: 0; /* 4. Colle en haut */
    z-index: -999;
    object-fit: cover; /* garde toute l'image visible */

    object-position: 40% center;

    /* 1. LE FONDU */
    -webkit-mask-image: 
        linear-gradient(to left, 
            black 0%, 
            black 70%, /* 70% net à droite */
            rgba(0,0,0,0) 100%), /* fondu à gauche */
        linear-gradient(to bottom, 
            black 0%, 
            black 55%, /* 80% net en bas */
            rgba(0,0,0,0) 100%), /* fondu en haut */
        linear-gradient(to top, 
            black 0%, 
            black 80%, 
            rgba(0,0,0,0) 100%);
    mask-image: 
        linear-gradient(to left, 
            black 0%, 
            black 70%, 
            rgba(0,0,0,0) 100%),
        linear-gradient(to bottom, 
            black 0%, 
            black 55%, 
            rgba(0,0,0,0) 100%),
        linear-gradient(to top, 
            black 0%, 
            black 80%, 
            rgba(0,0,0,0) 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

/* 2. LE FOND BLANC QUI APPARAIT DERRIERE */
.bgh1-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff; /* teinte blanche accentuée */
    z-index: -1; /* derrière l'image */

    /* Même fondu que l'image pour que ça se raccorde */
    -webkit-mask-image: 
        linear-gradient(to left, 
            black 0%, 
            black 70%, 
            rgba(0,0,0,0) 100%),
        linear-gradient(to top, 
            black 0%, 
            black 90%, 
            rgba(0,0,0,0) 100%),
        linear-gradient(to bottom, 
            black 0%, 
            black 90%, 
            white 100%);
    mask-image: 
        linear-gradient(to left, 
            black 0%, 
            black 70%, 
            rgba(0,0,0,0) 100%),
        linear-gradient(to top, 
            black 0%, 
            black 90%, 
            white 100%),
        linear-gradient(to bottom, 
            black 0%, 
            black 90%, 
            white 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

/* Main Content */
.content-wrapper {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .content-wrapper { 
        flex-direction: row; 
    }
}

/* Sidebar */
.sidebar {
    width: 28%;
    background-color: #0f1c2e;
    color: #ffffff;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.profile-img-container {
    position: relative;
    width: 17rem;
    height: 19rem;
    margin: 16px;
    border-radius: 50%;
    border: 4px solid #c99a4e;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    display: flex;
    align-items: flex-start;
}

.profile-img {
    position: relative;
    width: 100%;
    object-fit: contain;
}

.sidebar-section-title {
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1e304b;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1e304b;
}

.sidebar-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.sidebar-list span.flex {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.skill-category {
    margin-bottom: 1rem;
}

.skill-category h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    color: #4b5563;
    background-color: white;
}

.lang-dots {
    display: flex;
    gap: 0.25rem;
    color: #c99a4e;
    font-size: 0.75rem;
}

.interests {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.interests i {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    color: #c99a4e;
}

/* Main Area */
.main-area {
    width: 100%;
    padding: 2rem;
}

@media (min-width: 768px) {
    .main-area { 
        width: 66.666667%; 
        padding: 3rem; 
    }
}

.skills-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.skills-nav span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid #c99a4e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c99a4e;
}

.section-title {
    letter-spacing: 0.05em;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 8rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 20px;
    bottom: -10px;
    width: 2px;
    background-color: #e5e7eb;
}

.timeline-item:last-child .timeline-line {
    display: none;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background-color: #c99a4e;
    border-radius: 50%;
    position: absolute;
    left: -5px;
    top: 6px;
}

.timeline-date {
    position: absolute;
    left: -8rem;
    top: 0;
    width: 6rem;
    text-align: right;
}

.timeline-content ul {
    list-style: disc inside;
    margin-top: 0.25rem;
}

.timeline-content li {
    margin-bottom: 0.25rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.project-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.project-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
}

.project-desc {
    height: 5rem;
    margin-bottom: 1rem;
}

.project-tech {
    margin-bottom: 1rem;
}

.project-tech-title {
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.project-links {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.project-links a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.project-links a:hover {
    color: #c99a4e;
}

/* Bottom Grid */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .bottom-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

.academic-timeline {
    position: relative;
    padding-left: 4rem;
}

.academic-timeline .timeline-date {
    left: -4rem;
    width: 3rem;
}

.transversal-skills li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: #0f1c2e;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 4px solid #c99a4e;
    position: relative;
    overflow: hidden;
}

.footer-deco {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
    background-image: radial-gradient(#c99a4e 1px, transparent 1px);
    background-size: 20px 20px;
}

.footer p {
    position: relative;
    z-index: 10;
    margin: 0;
}