body {
    --main-color: #454545;
    --secondary-color: #cbc0d3;
    /* --light-blue: rgb(33, 158, 188);
    --vlight-blue: rgb(142, 202, 230);*/
    --light-grey: rgb(225, 229, 242); 
    --photo-width: 280px;
    padding: 40px 80px;
    font-family: "Open Sans", sans-serif;
    font-weight: 300;
    font-size: 16px;
    width: 65%;
    margin-left: auto;
    margin-right: auto;
    color: var(--main-color);
}

/* Tweak headings to avoid overflow */
h1 {
    font-size: 26px;
}
h2 {
    font-size: 28px;
}
h3 {
    /* color: var(--main-color); */
    /* margin: 10px 0px;  */
    font-size: 20px;
    /* font-weight: 200; */
    /* font-family: "Georgia", serif; */
    /* text-align: center; */
}
h4 {
    font-size: 20px;
    font-weight: 200;
}
.abstract {
    width: 80%;
    margin: 0 auto;
    text-align: justify;
}


/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #d3d3d3;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0px;
}

/* Align content with bio (start after sidebar) */
.site-brand {
    color: var(--main-color);
    font-weight: 600;
}
.site-nav ul {
    list-style: none;
    margin: 0px;
    padding: 0px;
    /* font-family: "Georgia", serif; */
    font-weight: 200;
}
.site-nav li {
    display: inline;
    margin-left: 16px;
}
.site-nav a {
    text-decoration: none;
}


.text.legend {
    font-size: 15px;
    text-align: left;
    width: 90%;
    display: block;
    margin: 0 auto;
    color: var(--main-color);
}

/* LINK */
.custom-link {
    color: var(--secondary-color)
}
.box-link {
    /* text-decoration: none; */
    color: var(--secondary-color);
    /* font-weight: 400; */
}
.publi-title{
    color: var(--main-color);
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 0px;
}
.publi-text {
    /* font-size: 16px; */
    margin-top: 0px;
    text-align: justify;

}
.publi-proc{
    font-style: italic;
    /* font-size: 13px; */
    margin-bottom: 0px;

}
.publi-pic {
    width: 200px;
    border-radius: 0px;
    object-fit: cover;
    margin-right: 30px;
    margin-left: 10px;
   
}
.container {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.box {
    display: inline-block;
    padding: 2px;
    /* border: 1.5px solid var(--secondary-color); */
    /* border-radius: 5%; */
    margin-top: 0px;
    /* background-color: var(--main-color); */
  }
.box-math {
    display: block;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    /* font-size: 1px; */
    text-align: justify; /* Justify the text inside the box */
    border: 1px solid;
    padding: 5px 10px;
    border-radius: 4px;
    margin: 10px auto; /* Center the box horizontally */
    width: 80%; /* Adjust the width as needed */
}
/* Nav bar*/
/* Less specific */
nav ul, footer ul {
    font-family:'Helvetica', 'Arial', 'Sans-Serif';
    padding: 0px;
    list-style: none;
    font-weight: bold;
}
nav ul li, footer ul li {
    display: inline;
    margin-left: 20px;
    margin-right: 20px; /* largeur inter section */
}
p {
    text-align: justify;
}
.publication-institutions li {
    display: inline;
    font-size: 15px;
    margin-left: 15px;
    margin-right: 20px;
}
.publication-institutions {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: center;
}
.publication-links li {
    display: inline;
    margin-left: 20px;
    margin-right: 20px;
}
.publication-links {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: center;
}

.publication-authors li {
    display: inline;
    margin-left: 15px;
    margin-right: 15px;
    font-size: 17px;
    font-weight: 200;
}
.publication-authors {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: center;
}

/* BOX */
.box-link {
    text-decoration: none;
    color:var(--main-color);
    font-weight: 400;
}
.container {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.box {
    display: inline-block;
    padding: 8px;
    border: 2px solid var(--main-color);
    border-radius: 15px;
    margin-top: 0px;
    /* background-color: var(--main-color); */
  }

/* Bibtex block */
code {
    display: block;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 12px;
    text-align: left;
    border: 1px solid var(--main-color);
    padding: 5px 10px;
    border-radius: 4px;
    /* background-color: #f8f9fa; */
    margin-top: 0;
}

.bibtex-container {
    position: relative;
}
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--main-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    z-index: 10;
}

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

.copy-btn i {
    margin-right: 5px;
}


/* Responsive: full-width on small screens */
@media (max-width: 640px) {
    body {
        width: 100%;
        padding: 20px;
    }

    .site-nav li {
        margin-left: 10px;
    }

    .container {
        flex-direction: column;
        align-items: flex-start;
    }


    /* Fix equation overflow on mobile */
    .mjx-container {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .MathJax {
        font-size: 0.85em !important;
    }

    /* Make images larger on mobile */
    img {
        max-width: 80% !important;
        width: 80% !important;
        height: auto !important;
    }
    figcaption {
        max-width: 80% !important;
        width: 80% !important;
        font-size: 14px !important;
    }
    
    .publi-pic {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 15px;
    }
}

/* Keep small icons inline inside link buttons */
.box-link img {
    display: inline;
    vertical-align: middle;
}