:root {
    --color-1: #02000a;
    --color-2: #a594fd;
    --color-3: #d9d9d9;
    --color-4: #02000a83;
    --color-5: #a594fd83;
    --gap: 30px;
    --gap2: calc(var(--gap) * 2);
    --temps: 80s;
}

@font-face {
    font-family: Soligant;
    src: url("images/Soligant.ttf");
}

@font-face {
    font-family: avenir;
    src: url("images/Avenir.ttc");
}

* {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2 {
    color: var(--color-2);
    font-family: Soligant;
    font-weight: 100;
    font-size: clamp(50px,10vw,75px);
    line-height: 1.3;
}
h1 { max-width: 620px; }

h3 {
    color: white;
    margin: 0;
    font-family: Soligant;
    font-weight: 100;
    font-size: 4vh;
}

p, li {
    font-size: larger;
    font-weight: 100;
    max-width: 650px;
}

.legal p {
    max-width: 100%;
}

a {
    text-decoration: none;
}

body {
    font-family: avenir;
    background-color: var(--color-1);
    color: var(--color-3);
    background-image: url(images/overlay.png), radial-gradient(circle at center -50vh, var(--color-2), #544799 28%, var(--color-1) 70%);
    background-size: 100px 100px, 100vw 100vh;
    background-repeat: repeat, no-repeat;
    background-attachment: fixed, scroll;
}

nav {
    position: fixed;
    width: 100%;
    top: 0;
    background: var(--color-1);
    padding: 10px 0;
    text-align: center;
    z-index: 1000;
    color: var(--color-2);
    box-shadow: 0 0 20px var(--color-1);
}

nav .logo {
    font-family: Soligant;
    font-weight: 100;
    font-size: clamp(35px,5vw,45px);
    line-height: 1;
}
.legal nav .logo a {
    text-decoration: none;
    color: var(--color-2);
    line-height: 1;
}
.legal nav .logo a:hover {
    color: white;
}

header {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--gap);
    text-align: left;
}
header article {
    transform: translateY(10vh);
}

header p {
    margin: var(--gap) 0;
}

.cta-buttons {
    display: flex;
    gap: 10px;
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    opacity: 100%;
    transition: background-color 0.3s, color 0.3s, border 0.3s;
}

#header .cta-button {
    background-color: var(--color-2);
    color: var(--color-1);
    border: 2px solid var(--color-2);
}

#header .cta-button.secondary {
    background-color: transparent;
    color: var(--color-2);
    border: 2px solid var(--color-2);
}

#header .cta-button:hover {
    background-color: var(--color-3);
    color: var(--color-1);
    border: 2px solid var(--color-3);
}

#CV .cta-button {
    background-color: transparent;
    color: var(--color-1);
    border: 2px solid var(--color-1);
}

#CV .cta-button:hover {
    background-color: var(--color-1);
    color: var(--color-2);
}
#CV > div {
    margin: auto;
    width: fit-content;
}
section {
    padding: var(--gap2) var(--gap);
    text-align: left;
}

article {
    width: 80vw;
    max-width: 1000px;
    margin: 0 auto;
}

section#skills, section#legal1 {
    background-image: url(images/overlay.png), linear-gradient(var(--color-1) 100px, var(--color-2));
    background-size: 100px 100px, cover;
    background-repeat: repeat, no-repeat;
    background-attachment: fixed, scroll;
    padding-top: 20vh;
}

section#skills h2 {
    text-align: center;
    margin-bottom: 10vh;
}

section#skills h3 {
    transform: translate(-55px, -50%);
}

section#skills .content > div {
    background-color: var(--color-1);
    border-radius: 5px;
    padding: 0 var(--gap) var(--gap) var(--gap);
    background-image: url(images/overlay.png), radial-gradient(circle at right 50vh, var(--color-2), #544799 28%, var(--color-1) 70%);
    background-size: 100px 100px, cover;
    background-repeat: repeat, no-repeat;
    background-attachment: fixed, scroll;
    box-shadow: 5px 5px 10px var(--color-4);
    margin-bottom: var(--gap);
}

section#skills #CV p {
    color: var(--color-1);
    text-align: center;
    margin: auto;
    padding: 8vw 0 3vw 0;
}

section#universes, section#legal2 {
    background-color: var(--color-2);
    background-image: url(images/overlay.png);
    background-size: 100px 100px;
    background-repeat: repeat;
    background-attachment: fixed;
}

section#universes h2 {
    color: var(--color-1);
    text-align: center;
    margin-bottom: 5vh;
}
section#universes p {
    color: gray;
}
section#universes p.link {
    margin-top: var(--gap);
    color: var(--color-2);
}
section#universes p.link::before {
    content: '';
    display: inline-block;
    width: var(--gap);
    height: var(--gap);
    background-image: url(images/opens.png);
    background-size: cover;
    vertical-align: top;
    margin-right: 5px;
}

section#universes .content {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

section#universes .content a {
    color: var(--color-3);
    border-radius: 5px;
    margin: 20px 0;
    padding: var(--gap);
    transform: translateY(0);
    box-shadow: 0 0 0 transparent;
    transition: all 0.3s;
    background-color: var(--color-1);
}
section#universes .content a:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 10px var(--color-1);
}

section#universes .content a img {
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    section#universes .content {
        flex-direction: row;
        justify-content: space-around;
    }
    section#skills h3 {
        transform: translate(-10%, -50%);
    }
}

@media (min-width: 1024px) {
    section#skills .content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    section#skills .content > div {
        width: calc(30% - (var(--gap) *2) );
        margin: 0;
    }
    section#skills h3 {
        transform: translate(-20%, -50%);
    }
}

section#contact {
    padding: 60px 0;
    min-height: calc(97vh - 190px);
    background-image: linear-gradient(transparent, white), url(images/overlay.png), linear-gradient(var(--color-2), white 25%);
    background-size: cover, 100px 100px, cover;
    background-repeat: no-repeat, repeat, no-repeat;
    background-attachment: scroll, fixed, scroll;
}

section#contact article {
    margin-top: 10vh;
    padding: 0 20px;
}

section#contact p {
    color: var(--color-1);
    margin: var(--gap) 0;
}

section#contact a {
    color: var(--color-2);
    font-size: larger;
    font-weight: 200;
}

section#contact a:hover {
    text-decoration: underline;
}

section#contact a::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url(images/mail.png);
    background-size: cover;
    vertical-align: middle;
    margin-right: 5px;

}

footer {
    text-align: center;
    padding: 20px 0;
    min-height: 30px;
}

footer p {
    margin: auto;
    color: gray;
}

footer a {
    color: gray;
}

footer a:hover {
    text-decoration: underline;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    width: 30px;
    height: 30px;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-4);
    background-image: url(images/arrow.png);
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    padding: 10px;
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s;
}

.scroll-to-top:hover {
    background-image: url(images/arrowhover.png);
    background-color: var(--color-5);
}


section#contact .scrolling-text {
    position: relative;
    width: 100%;
    height: 20vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    color: var(--color-1);
    font-family: Soligant;
    text-transform: uppercase;
    font-weight: 100;
    font-size: 3vh;
}

section#contact .scrolling-text > div {
    display: flex;
    position: absolute;
    width: 200%;
    white-space: nowrap;
}

section#contact .scrolling-text > div > div {
    width: 50%;
}

section#contact .scrolling-text > div:nth-child(1) {
    top: 0;
    animation: scroll-right-to-left var(--temps) linear infinite;
    opacity: 0.7;
}

section#contact .scrolling-text > div:nth-child(2) {
    top: 33%;
    animation: scroll-left-to-right var(--temps) linear infinite;
    opacity: 0.3;
}

section#contact .scrolling-text > div:nth-child(3) {
    top: 66%;
    animation: scroll-right-to-left var(--temps) linear infinite;
    opacity: 0.15;
}

section#contact .scrolling-text b {
    vertical-align: sub;
}

@keyframes scroll-right-to-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-left-to-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0%);
    }
}
