/* Tokens */
:root {
    --background-surface: #fff9eb;
    --background-surface-secondary: #fff;
    --text-primary: #8d6000;
    --text-primary-hover: #452f00;
    --background-overlay: #332300;
}

[data-theme="dark"] {
    --background-surface: #332300;
    --background-surface-secondary: #1d1400;
    --text-primary: #fdd47a;
    --text-primary-hover: #fff9eb;
    --background-overlay: #fff9eb;
}

/* Text Style */
h1 {
    font-size: 3.05rem;
    margin: 0;
    font-weight: 700;
}

h2 {
    font-size: 2.44rem;
    margin: 0;
    font-weight: 600;
}

h3 {
    font-size: 1.95rem;
    margin: 0;
    font-weight: 500;
}

h4 {
    font-size: 1.56rem;
    margin: 0;
    font-weight: 500;
}

h5 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 500;
}

p {
    font-size: 1rem;
    margin: 0;
}

p.caption_text {
    font-size: 0.8rem;
}

p.small_print {
    font-size: 0.64rem;
}

figcaption {
    font-size: 0.8rem;
    padding: 0 1.5rem;
}

figure {
    margin: 0;
}


/* Buttons */
a {
    align-items: center;
    /* position: relative; */
    display: inline-block;
    min-height: 3rem;
    align-content: center;
    color: var(--text-primary);
}

a.btn-p {
    background-color: #fdd47a;
    border-radius: 999px;
    color: #332300;
    padding: 0 1rem;
    text-decoration: none;
}


em {
    font-style: italic;
}

.button-big {
    font-size: 1.25rem;
}

ul {
    font-size: 1.25rem;
}



/* Mobile */
.mobile-only {
    display: none;
}

/* Responsive Image */
img {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
}

/* Link Animation */
.link-external,
.link-back,
.link-up,
.link-next {
    transition: transform 0.3s ease;
}

.link-back,
.link-up {
    text-decoration: none;
}

.link-external:hover {
    transform: translate(0.5rem, -0.5rem);
}

.link-back:hover {
    transform: translateX(-0.5rem);
}

.link-next:hover {
    transform: translateX(0.5rem);
}

.link-up:hover {
    transform: translateY(-0.5rem);
}

/* Modal */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background-color: var(--background-overlay);
    opacity: 0.5;
}

.modal {
    display: none;
    position: fixed;
    min-width: 20rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1.5rem;
    border-radius: 1.5rem;
    z-index: 200;
    background-color: var(--background-surface);
}

.modal-header {
    display: flex;
    justify-content: end;
}

.theme-choice {
    margin-bottom: 2rem;
}

.theme-choice,
.lang-choice {
    display: flex;
    flex-direction: column;
}


/* No scroll */
.no-scroll {
    overflow: hidden;
}

/* Buttons */
button {
    min-height: 48px;
    height: 3rem;
    border: 0;
    padding: 0;
    font-size: 1rem;
    font-family: Nunito, Arial, sans-serif;
    cursor: pointer;
    background-color: transparent;
    text-align: start;
    color: var(--text-primary);
}

button:hover {
    color: var(--text-primary-hover);
}

/* Flex Column */
.flex-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Style for image hovering */
.hover-image {
    width: 24rem;
    /* Set a default width */
    height: auto;
    /* Maintain aspect ratio */
}

.hover-image-container {
    position: absolute;
    /* Position the image relative to the viewport */
    /* display: none; Hide the image by default */
    pointer-events: none;
    /* Prevent interference with pointer events */
    opacity: 0;
    /* Start hidden */
    transform: scale(0.5) rotate(0deg);
    /* Start at half size and no rotation */
    transition: opacity 0.3s ease, transform 0.3s ease, left 0.5s ease, top 0.5s ease;
    /* Smooth CSS transitions */
    z-index: 10;
}

/* Page */
html {
    height: -webkit-fill-available;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Nunito, Arial, sans-serif;
    line-height: 1.6;
    padding: 0;
    margin: 0 8rem;
    transition: background-color 0.3s, color 0.3s;
    background-color: var(--background-surface);
    color: var(--text-primary);
    /* mobile viewport bug fix */
    min-height: -webkit-fill-available;
}

.link-container {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 1.5rem 0;
    justify-content: space-between;
}

main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.card {
    position: relative;
    z-index: 20;
}

.hover-link::before {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hover-link-highlight::before {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.header-content {
    padding: 1.5rem 0 4rem 0;
    display: flex;
    flex-direction: column;
    align-items: end;
    min-height: 80vh;
    /* Adjust size from the viewport */
}

.name {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.header-text {
    justify-content: center;
    flex: 1;
}

.logo {
    width: 2rem;
    height: 2rem;
}

.center-content {
    justify-content: center;
    width: 100%;
    display: flex;
    flex: 1;
    align-items: center;
}

.introduction {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tag-container {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.text-container {
    padding: 0 6rem;
    max-width: 45rem;
    width: 100%;
}

.project-highlight {
    padding: 0;
    max-width: 65rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
}

.project-highlight img,
.project-highlight .text-highlight {
    width: 50%;
}
.text-highlight {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.title-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.image-container {
    width: 100%;
    max-width: 65rem;
}

.flex-container {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
    max-width: 65rem;
}

.flex-inversed {
    flex-direction: row-reverse;
}

.text-column {
    max-width: 45rem;
    width: 100%;
}

.image-column {
    width: 100%;
}

footer {
    padding: 4rem 0;
}

.contact-container {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

/* Results */

.results {
    background-color: var(--background-surface-secondary);
    padding: 1.5rem 1rem;
    border-radius: 1.5rem;
}

/* Langages */

.content-lang {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content-lang.show {
    display: block;
    opacity: 1;
}

/* Columns */
.column-6 {
    width: 66%;
}

.column-3 {
    width: 33%;
}

/* No Border */
.no-border {
    border-radius: 0;
}


/* Mobile */
@media screen and (max-width: 600px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: inline;
    }

    body {
        margin: 0 1rem;
    }

    img {
        border-radius: 1rem;
    }

    figcaption {
        padding: 0 1rem;
    }

    .text-container {
        padding: 0;
        max-width: auto;
    }

    .flex-container {
        flex-direction: column;
        gap: 4rem;
    }

    .header-content {
        padding: 1.5rem 0 4rem 0;
    }

    .modal {
        width: 100%;
        height: 100%;
        padding: 1.5rem 1rem;
        border-radius: 0;
        box-sizing: border-box;
    }

    .project-highlight {
        flex-direction: column;
        gap: 1rem;
    }

    .project-highlight img,
    .project-highlight .text-highlight {
        width: 100%;
    }

    .center-content {
        padding-top: 3rem;
    }

    /* Reset Columns */
    .column-6,
    .column-3 {
        width: 100%;
    }
}