/* ----------------------------------------------
=== Fonts
----------------------------------------------- */  

/* dancing-script-latin-wght-normal */
@font-face {
    font-family: 'Dancing Script Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 400 700;
    src: url(https://cdn.jsdelivr.net/fontsource/fonts/dancing-script:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* hanken-grotesk-latin-wght-normal */
@font-face {
    font-family: 'Hanken Grotesk Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(https://cdn.jsdelivr.net/fontsource/fonts/hanken-grotesk:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}


/* ----------------------------------------------
=== Global
----------------------------------------------- */  

:root {
    --logo-font-family: 'Dancing Script Variable';
    --text-font-family: 'Hanken Grotesk Variable';
    --text-color: white;
    --main-color: #FFC576;
    --bg-color: #1F2235;
    --bg-alternate-color: #313552;
    --border-radius: 8px;
    --transition: all .2s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--text-font-family);
    line-height: 1.5;
    color: var(--text-color);
}

header {
    position: absolute;
    top : 0;
    left: 0;
    right: 0;
}

.container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

header {
    padding: 2em 4em;
}

section {
    padding: 6em 4em;
}

section:nth-child(1),
section:nth-child(4) {
    background-color: var(--bg-color);
}

section:nth-child(2),
section:nth-child(3),
section:nth-child(5) {
    background-color: var(--bg-alternate-color);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4em;
}

.cards__item {
    padding: 1.5em;
    text-align: center;
    border: 1px solid var(--main-color);
    border-radius: var(--border-radius);
}

.main-page h2,
.legal-notice h1,
.article-page h1 {
    position: relative;
    display: inline-block;
    color: var(--main-color);
    font-weight: 800;
    font-size: 2em;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 1.5em;
}

.main-page h2{
    margin-top: 0.8em;
}

.main-page h2::after,
.legal-notice h1::after,
.article-page h1::after {
    content: "";
    position: absolute;
    bottom: -0.15em;
    left: -0.2em;
    right: 0.2em;
    height: 0.5em;
    background-color: #494f7a;
    border-radius: 4px;
}

.main-page h2 span,
.legal-notice h1 span,
.article-page h1 span {
    position: relative;
    z-index: 1;
}

.legal-notice h2,
.article-page h2 {
    font-weight: 400;
    font-size: 1.5em;
    line-height: 1;
    margin-top: 0.8em;
    margin-bottom: 0.5em;
    color: var(--main-color);
}

h3 {
    font-weight: 400;
    font-size: 1.5em;
    text-align: center;
}

footer {
    padding: 0.5em 4em;
    text-align: center;
    color: #BEBFC5;
    background-color: #2C3049;
}

footer p {
    margin: 0;
}


/* ----------------------------------------------
=== Header
----------------------------------------------- */  

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--logo-font-family);
    font-size: 3em;
    color: var(--main-color);
}

nav {
    text-transform: uppercase;
}

nav > ul {
    display: flex;
    align-items: center;
    gap: 1em;
}

nav > ul > li:hover {
    color: var(--main-color);
}

nav a {
    position: relative;
    transition: var(--transition);
}

nav a:hover {
    text-decoration: none;
}

nav > ul > li:last-child > a {
    display: block;
    border: 1px solid var(--main-color);
    padding: 0.5em 1em;
    border-radius: 4px;
}

nav > ul > li:last-child:hover > a {
    background-color: var(--main-color);
    color: var(--bg-color);
}

nav > ul > li:not(:last-child) > a::before,
nav > ul > li:not(:last-child) > a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    background-color: var(--main-color);
    transition: var(--transition);
}

nav > ul > li:not(:last-child) > a::before {
    top: -16px;
    right: 0;
}

nav > ul > li:not(:last-child) > a::after {
    bottom: -16px;
    left: 0;
}

nav > ul > li:not(:last-child):hover > a::before,
nav > ul > li:not(:last-child):hover > a::after {
    width: 70%;
}


/* ----------------------------------------------
=== Profil
----------------------------------------------- */  

.profil {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
}

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

.profil__container h1,
.profil__container > div {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

h1 > span {
    display: block;
}

.profil__container > div > p {
    color: var(--main-color);
}

.profil__name {
    line-height: 1;
    font-family: var(--logo-font-family);
    font-size: 4em;
    font-weight: 600;
}

.profil__picture {
    display: none;
}


/* ----------------------------------------------
=== About
----------------------------------------------- */ 
.about p {
    font-size: 1.2em;
}

/* ----------------------------------------------
=== Projects
----------------------------------------------- */ 

.projects a {
    background-color: var(--bg-alternate-color);
    transition: var(--transition);
}

.projects a:hover {
    box-shadow: 0 0 4em rgba(0, 0, 0, .5);
    transform: scale(1.02);
    /* outline: 0.5em solid var(--main-color); */
}

.projects img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.projects .cards {
    grid-template-columns: repeat(2, 1fr);
}

/* ----------------------------------------------
=== Contact
----------------------------------------------- */ 
.contact > .container > div {
    display: flex;
}

.contact > .container > div > ul {
    text-align: left;
}

.contact > .container > div > ul > li,
.contact > .container > div > ul > li > a {
    display: flex;
    align-items: center;
    gap: 1em;
}

.contact-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4em;
}

.contact-cards__item a {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 10em;
}

.contact-cards__item img {
    width: 3em;
}


/* ----------------------------------------------
=== Footer
----------------------------------------------- */ 

footer .container {
    display: flex;
    justify-content: space-around;
}

/* ----------------------------------------------
=== Article
----------------------------------------------- */ 
.article {
    display: flex;
    min-height: 100vh;
}

.article h2 {
    margin-top: 0;
}

.article-page {
    background-color: var(--bg-color);
}

.article-page header {
    position: static;
}

.article-page .grid {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.article-page .grid img {
    width: 100%;
    height: auto;
    border: 1px solid var(--main-color);
    border-radius: var(--border-radius);
}

.article-page .grid div {
    background-color: rgba(0, 0, 0, .1);
    padding: 2em;
    border-radius: var(--border-radius);
    border-left: 2px solid var(--main-color);
}

.article-page .grid div img {
    margin: 2em 0;
}

/* ----------------------------------------------
=== Legal Notice
----------------------------------------------- */ 
.legal-notice {
    background-color: var(--bg-alternate-color);
}

.legal-notice header {
    position: static;
}

.legal-notice p {
    margin-bottom: 2em;
}

/* ----------------------------------------------
=== Media
----------------------------------------------- */ 
@media screen and (max-width: 768px) {
    .projects .cards {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (max-width: 991px) {
    header {
        padding: 2em 2em;
        position: inherit;
        background-color: var(--bg-color);
    }
    
    section {
        padding: 6em 2em;
    }

    nav {
        margin: auto;
    }

    .logo {
        display: none;
    }

    .contact > .container {
        flex-direction: column;
        align-items: center;
    }
    
    .cards {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .article-page main .container{
        flex-wrap: wrap;
    }

    .article-page .cards {
        flex-wrap: wrap;
    }
}

@media screen and (min-width: 992px) {
    .main-page h2,
    .legal-notice h1,
    .article-page h1 {
        font-size: 3em;
    }

    .legal-notice h2,
    .article-page h2 {
        font-size: 2em;
    }

    h3 {
        font-size: 1.8em;
    }

    nav {
        font-size: 1.5em;
    }

    .profil {
        padding-left: 6em;
        padding-right: 6em;
    }

    .profil__container {
        justify-content: space-between;
        text-align: left;
        font-size: 1.5em;
    }

    .profil__picture {
        display: block;
        border-radius: 50%;
    }

    .contact-cards__item a {
        align-items: center;
    }

    .article-page .grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    .article-page .grid img {
        grid-area: 1 / 1 / 2 / 4;
    }

    .article-page .grid p {
        font-size: 1.1em;
    }

    .article-page .grid div {
        border-left: 2px solid var(--main-color);
        border-bottom: none;
    }
    
    .article-page .grid div:nth-child(2) {
        grid-area: 1 / 4 / 2 / 7;
    }
    
    .article-page .grid div:nth-child(3) {
        grid-area: 2 / 1 / 3 / 4;
    }
    
    .article-page .grid div:nth-child(4) {
        grid-area: 2 / 4 / 3 / 7;
    }
}