/*--------------------*/
/*------VARIABLES-----*/
/*--------------------*/

:root {
    --color-bg: #0d0a25;
    --color-bg-alt: #1f2c67;
    --color-font: #efefff;
    --color-accent: #dea152;
    --background-size: 200px;
}

/*--------------------*/
/*-----RESPONSIVE-----*/
/*--------------------*/

@media screen and (orientation: landscape) {
    .index {
        overflow: hidden;
    }
    .index footer {
        position: absolute;
        bottom: 0;
        left: 0;
    }
    nav ul {
        display: flex;
    }
    .index section {
        flex-direction: row;
    }
    .projects section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    .projects section h2 {
        grid-column: span 2;
    }
}

@media screen and (orientation: portrait) {
    .index {
        overflow: visible;
    }
    .index footer {
        position: relative;
    }
    nav ul {
        display: none;
    }
    .index section {
        flex-direction: column;
    }
    .projects section {
        display: grid;
        grid-template-columns: 1fr;
    }
    .projects section h2 {
        grid-column: span 1;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: Helvetica, Arial, sans-serif;

    background: repeating-conic-gradient(from 30deg, #0000 0 120deg, #0d0a25 0 180deg) calc(.5 * var(--background-size)) calc(.5 * var(--background-size) * 0.577), repeating-conic-gradient(from 30deg, #090621 0 60deg, #0b0823 0 120deg, #090621 0 180deg);
    background-size: var(--background-size) calc(var(--background-size) * 0.577);

    color: var(--color-font);
}

img, hr, br, h1, button, li.here, a, .cp {
    user-select: none;
}

button {
    background: none;
    border: none;
    color: var(--color-font);
}
button:hover, div.burger {
    cursor: pointer;
}

div.burger div {
    transition: all 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1em 0 1em;
    background-color: var(--color-bg-alt);
    border-bottom: solid 3px var(--color-accent);
}

ul {
    display: flex;
    justify-content: space-between;
    list-style: none;
    width: 40%;
}

a:hover, li.here {
    color: var(--color-accent);
}

a, li {
    font-weight: bold;
    text-decoration: none;
    color: var(--color-font);
    transition: all 0.3s;
}

div.burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 2.5em;
    width: 3em;
}
div.burger div {
    height: 0.2em;
    border-radius: 10px;
    align-self: flex-end;
}
div.burger div:nth-child(1) {
    width: 2em;
    background-color: #ff2222;
}
div.burger div:nth-child(2) {
    width: 2.6em;
    background-color: #00ffff;
}
div.burger div:nth-child(3) {
    width: 2.3em;
    background-color: var(--color-accent);
}
div.burger div:nth-child(4) {
    width: 3em;
    background-color: #22ff22;
}
div.burger div:nth-child(5) {
    width: 1.6em;
    background-color: #ff22aa;
}
div.burger:hover div {
    width: 2em;
}
div.burger:hover div:nth-child(1) {
    margin-right: 0em;
}
div.burger:hover div:nth-child(2) {
    margin-right: 0.5em;
}
div.burger:hover div:nth-child(3) {
    margin-right: 1em;
}
div.burger:hover div:nth-child(4) {
    margin-right: 0.5em;
}
div.burger:hover div:nth-child(5) {
    margin-right: 0em;
}

div.burger.clicked {
    transition: all 0.3s;
}

/*--------------------*/
/*--------ASIDE-------*/
/*--------------------*/

aside {
    background-color: #000000;
    width: 4em;
    height: 10em;
    position: fixed;
    right: 0;
    top: 25%;
    display: flex;
    flex-direction: column;
    padding: 0.5em;
    align-items: center;
    justify-content: space-around;
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
}
aside button {
    background-color: transparent;
    border: none;
    margin: 0;
    padding: 0;
}
aside img {
    width: 2.5em;
    filter: brightness(0) invert(1);
}
aside img:first-child {
    width: 3.2em;
}

/*--------------------*/
/*--------MAIN--------*/
/*--------------------*/

body.index section {
    padding: 4em;
    display: flex;
    width: 85%;
    justify-content: space-between;
}
body.index h1 {
    user-select: none;
}

body.projects main {
    display: flex;
    flex-direction: column;
    align-items: center;
}
body.projects section {
    display: grid;
    width: 80%;
    column-gap: 4em;
    padding-left: 4em;
    padding-right: 4em;
}
body.projects section h2 {
    grid-column: span 2;
    user-select: none;
}
body.projects section article {
    padding: 1em;
    background-color: var(--color-bg-alt);
    border: solid 3px var(--color-accent);
    border-radius: 30px;
    transition: all 0.3s;
    height: fit-content;
    font-size: 125%;
    position: relative;
    margin-bottom: 2em;
    z-index: 1; /* Ensure the article is on top of the ::before pseudo-element */
}
body.projects section article.perso {
    border-color: var(--color-font);
}
body.projects section article:hover {
    transform: translateY(-0.5em);
}

body.projects main {
    margin-bottom: 2em;
}

body.projects figure {
    display: flex;
    align-items: center;
}
body.projects figure img {
    filter: brightness(0) invert(1);
    max-width: 3em;
    max-height: 3em;
    object-fit: contain;
    margin-right: 1em;
}
body.projects figure h3 {
    font-size: 150%;
}
body.projects button {
    width: fit-content;
    font-size: 100%;
}
body.projects article h4 {
    margin-left: 1em;
}
div.techs {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
div.techs div {
    margin-left: 1em;
    font-size: 90%;
    background: linear-gradient(40deg, var(--color-bg), var(--color-accent));
    border-radius: 30px;
    padding: 1em;
    transition: all 0.3s;
    user-select: none;
    margin-bottom: 1em;
}
div.techs div:hover {
    filter: invert(1);
}

/*--------------------*/
/*--------ABOUT-------*/
/*--------------------*/

body.about section {
    padding: 4em;
    justify-self: center;
    justify-self: center;
}
body.about button {
    width: fit-content;
}
body.about section.about {
    width: 85%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4em;
}
body.about article {
    padding: 2em;
    background-color: var(--color-bg-alt);
    border: solid 3px var(--color-accent);
    border-radius: 30px;
}
body.about article.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
body.about article.profile img {
    max-width: 12em;
    max-height: 12em;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    margin-bottom: 3em;
}
body.about article.profile figcaption {
    font-size: 200%;
    font-weight: bold;
    user-select: none;
}
body.about article h2 {
    color: var(--color-accent);
    font-style: normal;
    user-select: none;
}
body.about article h3 {
    font-style: italic;
    font-weight: lighter;
    color: #dfdfff;
    font-size: 150%;
}
body.about article p {
    font-size: 120%;
    line-height: 125%;
}
body.about article.cv {
    text-align: center;
    justify-content: center;
}
body.about article.cv h2 {
    color: var(--color-accent);
    font-weight: bold;
}

body.about section.form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 85%;
    gap: 4em;
}
body.about section h2 {
    grid-column: span 2;
    color: var(--color-accent);
    font-style: normal;
    justify-self: center;
    font-weight: bold;
    user-select: none;
}
body.about section.form article div {
    background-color: var(--color-accent);
    border-radius: 30px;
    color: var(--color-bg);
    width: fit-content;
    padding: 1em;
    user-select: none;
    font-weight: bold;
}
body.about section.pass {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: 85%;
    gap: 4em;
}
body.about section.pass h2 {
    grid-column: span 6;
}
body.about section.pass article {
    text-align: center;
}
body.about section.pass h3 {
    color: var(--color-accent);
    font-style: normal;
    font-weight: bold;
    user-select: none;
}
body.about section.pass img {
    max-width: 7em;
    max-height: 7em;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

body.about section.pass article {
    grid-column: span 2;
}

body.about section.pass article:nth-child(5) {
    grid-column: 2 / span 2;
}

body.about section.pass article:nth-child(6) {
    grid-column: 4 / span 2;
}

body.about section.comp {
    width: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
body.about section.comp div#comp {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4em;
}
body.about section.comp div div {
    text-align: center;
    background: linear-gradient(40deg, var(--color-bg-alt), var(--color-accent));
    width: 8em;
    font-size: 150%;
    border-radius: 30px;
    padding: 1em;
    color: var(--color-bg);
    user-select: none;
    transition: all 0.3s;
    align-content: center;
}
body.about section.comp div div:hover {
    filter: invert(1);
}
body.about .plus {
    display: none;
}
body.about .moins {
    display: block;
}

body.about div.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(13, 10, 37, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

body.about div.modal.show {
    display: flex;
}

body.about div.modal .modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 900px;
    max-height: 700px;
    background-color: var(--color-bg-alt);
    border: 3px solid var(--color-accent);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.about div.modal .modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-font);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(13, 10, 37, 0.8);
    transition: all 0.3s;
}

body.about div.modal .modal-close:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
    transform: scale(1.1);
}

body.about div.modal iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}



article.pres {
    line-height: 150%;
}
article.par {
    width: 35%;
    background-color: var(--color-bg-alt);
    font-size: x-large;
    border: solid 3px var(--color-accent);
    border-radius: 30px;
    line-height: 200%;
    text-align: left;
    padding: 1em;
    align-self: center;
}

section h1 {
    font-size: 500%;
    user-select: auto;
    flex-wrap: wrap;
}
section h2 {
    font-size: 300%;
    font-style: italic;
    font-weight: lighter;
    color: #dfdfff;
}

section ul {
    padding: 0;
    display: flex;
}
section li {
    list-style: none;
    margin-right: 2em;
    align-content: center;
}

section button {
    background-color: var(--color-accent);
    color: var(--color-bg);
    border: solid 3px transparent;
    border-radius: 10px;
    font-size: 175%;
    font-weight: bold;
    width: 8em;
    padding: 0.5em;
    text-align: center;
    transition: all 0.3s;
    margin: 1em;
}
section button:hover {
    background-color: transparent;
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/*--------------------*/
/*-------FOOTER-------*/
/*--------------------*/

footer {
    background-color: var(--color-bg-alt);
    border-top: 3px solid var(--color-accent);
    width: 100%;
    height: 5em;
    align-content: center;
}

footer ul {
    width: 75%;
    display: flex;
    justify-self: center;
    justify-content: space-around;
}

footer li {
    align-content: center;
    text-align: center;
}

footer a {
    align-content: center;
    vertical-align: middle;
}

footer li {
    display: flex;
    align-items: center;
}

footer a {
    display: flex;
    align-items: center;
}

footer li img {
    max-height: 3em;
    object-fit: contain;
    filter: brightness(0) invert(1);
    align-self: center;
}