/* ---- Root */


@media (prefers-color-scheme: light) {

    :root {
        --light--bg-color-0: #fdfdfd;
        --light--bg-color-1: #f3f3f3;

        --light--fg-color-0: #111;
        --light--fg-color-1: #666;

        --light--shadow-color-0: #0000002a;
        --light--line-color-0: #d3d3d3;

        --light--link-color-0: #2a7ae2;
        --light--table-border-color-0: #d1d1d1;

        --light--header-footer-border-color: var(--fg-color-0);

        --light--link-card-bg-color: var(--bg-color-1);
        --light--link-card-border-color: #eee;

        --light--project-header-bg-color: #fafafaf0;
    }
}

@media (prefers-color-scheme: dark) {

    :root {
        --dark--bg-color-0: #212121;
        --dark--bg-color-1: #414141;

        --dark--fg-color-0: rgb(213, 213, 213);
        --dark--fg-color-1: #b1b1b1;

        --dark--line-color-0: #ffffff2a;

        --dark--link-color-0: #2f88fd;
        --dark--table-border-color-0: #505050;

        --dark--header-footer-border-color: var(--fg-color-0);

        --dark--link-card-bg-color: var(--bg-color-1);
        --dark--link-card-border-color: clear;

        --dark--project-header-bg-color: #414141f6;
    }
}

@media (prefers-color-scheme: light) {

    :root {
        --bg-color-0: var(--light--bg-color-0);
        --bg-color-1: var(--light--bg-color-1);

        --fg-color-0: var(--light--fg-color-0);
        --fg-color-1: var(--light--fg-color-1);

        --shadow-color-0: var(--light--shadow-color-0);
        --line-color-0: var(--light--line-color-0);

        --link-color-0: var(--light--link-color-0);
        --table-border-color-0: var(--light--table-border-color-0);

        --header-footer-border-color: var(--light--header-footer-border-color);

        --link-card-bg-color: var(--light--link-card-bg-color);
        --link-card-border-color: var(--light--link-card-border-color);

        --project-header-bg-color: var(--light--project-header-bg-color);
    }

    .color-scheme-dark {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {

    :root {
        --bg-color-0: var(--dark--bg-color-0);
        --bg-color-1: var(--dark--bg-color-1);

        --fg-color-0: var(--dark--fg-color-0);
        --fg-color-1: var(--dark--fg-color-1);

        --line-color-0: var(--dark--line-color-0);

        --link-color-0: var(--dark--link-color-0);
        --table-border-color-0: var(--dark--table-border-color-0);

        --header-footer-border-color: var(--dark--header-footer-border-color);

        --link-card-bg-color: var(--dark--link-card-bg-color);
        --link-card-border-color: var(--dark--link-card-border-color);

        --project-header-bg-color: var(--dark--project-header-bg-color);
    }

    .color-scheme-light {
        display: none;
    }
}

body {
    background-color: var(--bg-color-0);
    color: var(--fg-color-0);
}

a,
a:visited {
    color: var(--link-color-0);
}

a:hover {
    color: var(--fg-color-1);
}

main.page-content {
    padding-top: 1rem;
}

.monospace {
    font-family: monospace;
}

.normal-font {
    font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

code {
    background-color: transparent;
    border: none;
    padding: 0;
}

.fixed-space {
    display: inline-block;
    width: 0.5rem;
}

.highlighter-rouge .highlight {
    background-color: transparent;
}



/* ---- Header */


.site-header {
    border-top: none;
    border-bottom: 1px solid var(--header-footer-border-color);
}

.site-header .wrapper {
    display: flex;
    justify-content: space-between;
}

.site-header .wrapper .lang-and-menu {
    display: flex;
    gap: 2rem;
    line-height: 54px;
}

.site-header .wrapper::after {
    display: none;
}

.site-header .site-title {
    color: var(--fg-color-0);
}



/* ---- Footer */


.site-footer {
    border-top: 1px solid var(--header-footer-border-color);
    border-bottom: none;
}

@media (max-width: 800px) {

    .site-footer .wrapper {
        flex-direction: column;
    }
}



/* ---- Social media list */


.social-media-list a {
    display: flex;
    align-items: center;
    gap: 8px;
}



/* ---- Lang select */


.lang-select .lang {
    padding: 5px;
}


.lang-select .lang.active,
.lang-select .lang:hover {
    background: var(--bg-color-1);
    border-radius: 15px;
    text-decoration: none;
}



/* ---- Lang available banner */


.lang-available-banner p {
    margin: 0;
}

.lang-available-banner {
    display: flex;
    padding: 1rem;
    justify-content: center;

    background: var(--bg-color-1);
    border-radius: 0.5rem;
}

.lang-available-banner-content {
    display: flex;
    gap: 1rem;
}



/* ---- Sections */


section {
    margin-top: 5rem;
}

section:last-of-type {
    margin-bottom: 5rem;
}



/* ---- Tables */


table {
    color: var(--fg-color-0);
    border: none;
}

table td,
table th {
    border: none;
}

table tr {
    border-bottom: 1px solid var(--table-border-color-0);
}

table th {
    background-color: transparent;
}

table tr:nth-child(2n) {
    background-color: transparent;
}



/* ---- Heading with icon */


.heading-with-icon {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
}



/* ---- External link icon */


.external-icon {
    /* margin-left: 0.5em; */
}

.external-icon path {
    fill: gray;
    stroke: gray;
}



/* ---- List pointer style */


ul.list-pointer-style {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

ul.list-pointer-style li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 0.8rem;
}

ul.list-pointer-style li::before {
    content: "👉 ";
    position: absolute;
    left: 0;
    top: 0;
}



/* ---- Maths */

math {

    display: block;
    text-align: center;
    font-size: 1.5rem;
    margin: 2rem;
}



/* ---- Inline images */


.inline-image-container {
    margin: auto;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {

    .inline-image-container {
        width: 100%;
    }

    .inline-image-container.prevent-mobile-full-width {
        width: 50%;
    }
}

@media (min-width: 600px) {

    .inline-image-container {
        width: 50%;
    }

    .inline-image-container.force-desktop-full-width {
        width: 100%;
    }
}

.inline-image-container-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

@media (max-width: 600px) {

    .inline-image-container-row:not(.force-mobile-row) {
        flex-direction: column;
    }

    .inline-image-container:not(.force-mobile-row) .inline-image-container-row {
        margin-bottom: 1rem;
    }
}

.inline-image-item {
    text-align: center;
    margin-bottom: 1rem;
    flex: 1;
    position: relative;
}

.inline-image-container-row.free-width .inline-image-item {
    flex: inherit;
}

.inline-image-item figcaption {
    font-size: 0.8rem;
}

.inline-image-item img,
.inline-image-item video {
    object-fit: cover;
    width: 100%;
    border-radius: 8px;
}

.inline-image-item .image-p {
    padding-bottom: 4.6px;
}

.inline-image-item p {
    margin: 0;
}

.inline-image-item .image-legend {
    margin-top: 0.3rem;
}

.inline-image-item>*:not(.image-legend) .external-icon {
    display: none;
}

@media (max-width: 600px) {

    .inline-image-container-row #casier img {
        height: 550px;
    }
}



/* ---- Intro */


.intro {
    display: flex;
    gap: 2rem;
}

.intro img.profile {
    max-width: 60%;
    padding-bottom: 1rem;
}

.intro-item-1 {
    flex: 2;
}

.intro-item-2 {
    flex: 1;
}

@media (max-width: 600px) {

    .intro {
        flex-direction: column-reverse;
    }

    .intro-item-2 {
        text-align: center;
        display: flex;
        gap: 1rem;
        align-items: flex-end;
    }

    .intro img.profile {
        max-width: 40%;
        padding-bottom: 0;
    }
}



/* ---- Project cards */


.project-card {
    display: block;
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(243, 243, 243, 0.923);
    background-color: var(--bg-color-1);
    box-shadow: 3px 3px var(--shadow-color-0);
    border-top: 1px solid var(--line-color-0);
}

.project-card img {
    position: absolute;
    /*
    */
}

.project-card-content,
.project-card-posts {
    z-index: 10;
    position: relative;
    /*
    */
}

.project-card-main {
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    /*
    */
}

.project-card img.image_top_0 {
    top: 0;
}


.project-card-content {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 0.7rem;
    padding-left: 40%;
    color: var(--fg-color-0);
}

@media (max-width: 600px) {

    .project-card-content {
        padding: 0.7rem;
        padding-top: 50%;
    }
}

@media (min-width: 600px) and (prefers-color-scheme: light) {

    .project-card-content {
        background: linear-gradient(to right, transparent, #fafafaf0 35%);
    }
}

@media (min-width: 600px) and (prefers-color-scheme: dark) {

    .project-card-content {
        background: linear-gradient(to right, transparent, #212121f0 35%);
    }
}

@media (max-width: 600px) and (prefers-color-scheme: light) {

    .project-card-content {
        background: linear-gradient(to bottom, transparent, #fafafaf0 45%);
    }
}

@media (max-width: 600px) and (prefers-color-scheme: dark) {

    .project-card-content {
        background: linear-gradient(to bottom, transparent, #212121f0 45%);
    }
}

.project-card:hover a {
    text-decoration: none;
}

.project-card-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.project-card-text {
    margin-top: 0.7rem;
    color: #666;
    color: var(--fg-color-1);
    font-size: 0.9rem;
}

.project-card-subtitle {
    margin-top: 0.7rem;
}

.project-card img {
    transform: scale(1);
    transition: transform 10s;
}

.project-card:hover img {
    transform: scale(10);
    transition: transform 100s;
}

.project-card-content {
    padding-bottom: 1rem;
    /*
    */
}

.project-card-content svg {
    width: 1rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {

    .project-card-main {
        align-items: start;
    }

    .project-card img {
        height: 100%;
        object-fit: cover;
    }

    .project-card-subtitle {
        margin-top: 0.2rem;
    }
}



/*  Project card - posts */


.project-card-posts {
    padding: 0.7rem;
}

@media (prefers-color-scheme: light) {

    .project-card-posts {
        border-top: 1px solid var(--line-color-0);
    }
}

@media (prefers-color-scheme: dark) {

    .project-card-posts {
        background-color: #272727;
    }
}

.project-card-posts a {
    color: var(--fg-color-0);
    opacity: 0.9;
}

.project-card-posts-meta {
    color: var(--fg-color-1);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.project-card-posts-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0 1rem;
    align-items: baseline;
    justify-content: space-between;
    /*
    */
}

@media (max-width: 600px) {

    .project-card-posts-content {
        gap: 0 0.5rem;
    }
}

.project-card-posts-content p {
    margin-bottom: 0;
    color: var(--fg-color-1);
    flex-shrink: 0;
}

.project-card-posts-content h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0rem;
    flex-grow: 1;
}

.project-card-posts svg {
    width: 0.7rem;
    flex-shrink: 0;
    fill: var(--fg-color-0);
}



/* ---- Post cards */


.post-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {

    .post-cards-container {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 600px) {

    .post-card.odd:first-child {
        display: none;
    }
}

.post-card {
    padding: 8px;
    border-radius: 8px;
    background-color: var(--bg-color-1);
    box-shadow: 3px 3px var(--shadow-color-0);
}

.post-card img {
    height: 6rem;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.post-card a {
    color: var(--fg-color-0);
    /*
    */
}

.post-card:hover a {
    text-decoration: none;
    /*
    */
}

.post-card-content {
    padding: 4px;
    margin-top: 0.5rem;
}

.post-card .post-card-meta {
    color: var(--fg-color-1);
    margin-bottom: 0;
}

.post-card .project-name {
    font-style: italic;
    /*
    */
}

.post-card h3 {
    font-size: 1.1rem;
    line-height: 130%;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    /*
    */
}

.post-card .post-card-excerpt {
    font-size: 0.9rem;
    text-align: justify;
    margin-bottom: 0;
    /*
    */
}

.post-card .read-more {
    font-size: 0.9rem;
    color: var(--fg-color-0);
    /*
    */
}

@media (max-width: 600px) {

    .post-card .read-more {
        text-align: end;
        margin: 0;
        margin-top: 0.4rem;
    }
}

@media (min-width: 600px) {

    .post-card {
        position: relative;
        padding-bottom: 2rem;
    }

    .post-card .read-more {
        position: absolute;
        bottom: 0;
        right: 1rem;
    }
}

.post-card .read-more svg {
    width: 0.5rem;
    position: relative;
    top: 0.1rem;
    /*
    */
}

@media (max-width: 600px) {

    .post-card .read-more svg {
        width: 0.8rem;
        /*
        */
    }
}

.post-card .read-more svg path {
    fill: var(--fg-color-0);
    /*
    */
}



/* ---- Post links */


.project-post-link {
    padding: 8px;
    border-radius: 8px;
    background-color: var(--bg-color-1);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 600px) {
    .project-post-link {
        box-shadow: 3px 3px var(--shadow-color-0);
    }
}

.project-post-link a {
    color: var(--fg-color-0);
    /*
    */
}

.project-post-link:hover a {
    text-decoration: none;
    /*
    */
}

.project-post-link-content {
    padding: 4px;
    padding-left: 0.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.project-post-link-title-text {
    display: flex;
    align-items: baseline;
}

@media (min-width: 600px) {

    .project-post-link-title-text {
        flex-direction: row;
        gap: 1rem;
    }
}

@media (max-width: 600px) {

    .project-post-link-title-text {
        flex-direction: column;
        gap: 0;
    }
}

.project-post-link .project-post-link-meta {
    color: var(--fg-color-1);
    margin-bottom: 0;
    flex-shrink: 0;
}

.project-post-link h3.project-post-link-title {
    font-size: 1.1rem;
    line-height: 130%;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    text-align: start;
    /*
    */
}

.project-post-link .read-more {
    font-size: 0.9rem;
    color: var(--fg-color-0);
    margin: 0;
    flex-shrink: 0;
    /*
    */
}

@media (max-width: 600px) {

    .project-post-link .read-more {
        text-align: end;
        margin-top: 0.4rem;
    }

    .project-post-link .read-more span {
        display: none;
    }
}

.project-post-link .read-more svg {
    width: 0.5rem;
    position: relative;
    top: 0.1rem;
    /*
    */
}

@media (max-width: 600px) {

    .project-post-link .read-more svg {
        width: 0.8rem;
        /*
        */
    }
}

.project-post-link .read-more svg path {
    fill: var(--fg-color-0);
    /*
    */
}



/* ---- Posts list */


.posts-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: start;
}

@media (max-width: 600px) {

    .posts-list {
        grid-template-columns: 1fr;
    }
}

.posts-list-date {
    color: var(--fg-color-1);
}

.posts-list-meta {
    margin-bottom: 0rem;
    color: var(--fg-color-1);
}

article.project .posts-list h3 {
    margin-top: 0;
}

@media (max-width: 600px) {

    .posts-list .post-card img {
        height: 3rem;
    }
}



/* ---- Link cards */


.links-cards-container {
    display: grid;
    grid-template-columns: auto auto auto auto;
    gap: 8px;
    justify-content: space-between;
}

.link-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
    background: var(--link-card-bg-color);
    border: 1px solid var(--link-card-border-color);
    border-radius: 12px;
    box-shadow: 3px 3px var(--shadow-color-0);
}

.link-card:hover {
    text-decoration: none;
}

.link-card img {
    border-radius: 8px;
    width: calc(100% - 16px);
    margin: 8px;
    object-fit: cover;
    aspect-ratio: 1;
}

.link-card-content {
    padding: 5px 12px;
    padding-bottom: 12px;
    color: var(--fg-color-0);
}

@media (max-width: 800px) {

    .links-cards-container {
        grid-template-columns: auto auto auto;
    }
}

@media (max-width: 600px) {

    .links-cards-container {
        grid-template-columns: auto auto;
    }
}

.link-card-title {
    font-weight: bold;
    color: var(--link-color-0);
}



/* ---- Project page */


article.project header {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    text-align: start;
}

@media (min-width: 600px) {
    article.project header {
        box-shadow: 3px 3px rgba(0, 0, 0, 0.166);
    }
}

@media (prefers-color-scheme: dark) {
    article.project header {
        box-shadow: none;
    }
}

article.project h1,
article.project .content-type {
    text-transform: uppercase;
}

article.project h1 {
    font-family: 'Verdana';
    margin-top: 1rem;
    margin-bottom: 1rem;
}

article.project .title {
    width: fit-content;
    margin: auto;
}

article.project .teaser {
    text-align: center;
}

article.project .project-topics {
    margin-top: 1rem;
    text-align: center;
    color: var(--fg-color-1);
    font-style: italic;
}

article.project header img {
    position: absolute;
    z-index: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    aspect-ratio: initial;
}

article.project .header-content {
    background: var(--project-header-bg-color);
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    margin-top: 15rem;
    z-index: 1;
}

article.project .content-type {
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    background: #c4d7ef;
    color: rgb(0, 0, 0);
}

@media (max-width: 600px) {

    article.project header {
        display: block;
    }

    article.project header .image-container {
        max-height: 15rem;
        border-radius: 8px;
        overflow: hidden;
    }

    article.project header img {
        position: initial;
    }

    article.project .header-content {
        margin-top: 1rem;
        background: none;
        padding: 0;
    }
}

article.project {
    text-align: justify;
}

article.project h2 {
    margin-top: 2rem;
    text-align: start;
}



/* ---- Project post */


article.project-post .title h1 {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

article.project-post .title h1 a {
    color: var(--fg-color-0);
}

article.project-posts .title h1 a {
    color: var(--fg-color-0);
}

article.project-post .title h1 a:hover {
    text-decoration: none;
}

article.project-posts .title h1 a:hover {
    text-decoration: none;
}

article.project-post .project-post-title p {
    margin-bottom: 0;
}

article.project-post .project-post-title h2 {
    line-height: 110%;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    margin-top: 0;
}

article.project-post .project-post-date {
    color: var(--fg-color-1);
}

article.project-post .project-topics {
    text-align: left;
    margin-top: 0;
}

article.project-post .project-github {
    margin-top: 1rem;
}

@media (max-width: 600px) {

    article.project-post .title h1 {
        font-size: 1.2rem;
        margin-bottom: 1.3rem;
        margin-top: 1.5rem;
    }

    article.project-post .project-post-title h2 {
        font-size: 1.8rem;
    }
}

.project-post-navigation {
    display: flex;
    width: 100%;
    gap: 1rem;
    justify-content: stretch;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {

    .project-post-navigation {
        margin-top: 2rem;
    }
}

.project-post-navigation-item {
    flex: 1;
    background-color: var(--bg-color-1);
    border-radius: 8px;
    text-align: center;
    padding: 0.6rem 1rem;
}

.project-post-navigation a:hover {
    text-decoration: none;
}

@media (prefers-color-scheme: light) and (min-width: 600px) {

    .project-post-navigation-item {
        box-shadow: 3px 3px rgba(0, 0, 0, 0.166);
    }
}

@media (prefers-color-scheme: dark) {

    .project-post-navigation-item {
        box-shadow: none;
    }
}

.project-posts h2 {
    text-align: center;
    justify-content: center;
}



/* ---- Separator */


.separator {
    border-bottom: 1px solid lightgray;
    width: 60%;
    margin: auto;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.separator-small {

    width: 10%;
    margin: 0;
    margin-bottom: 2rem;
}



/* ---- Last updated */


.last-updated {

    display: block;
    margin-bottom: 1rem;
    font-style: italic;
    color: var(--fg-color-1);
}



/* ---- AI disclaimer */


.ai-disclaimer {
    font-size: 0.8rem;
    margin-top: 1rem;
}



/* ---- Utils */


.ghost {
    opacity: 0;
}

.no-wrap {
    white-space: nowrap;
}

@media (min-width: 800px) {
    .mobile-only {
        display: none;
    }
}

@media (max-width: 800px) {
    .desktop-only {
        display: none;
    }
}