/* 
Getting rid of some standard styling
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
* {margin: 0;padding: 0;box-sizing:border-box;}
html {line-height: 1.5;-webkit-text-size-adjust: 100%;}
ul, ol {list-style: none;}
a {text-decoration: none;color: inherit;}
h1, h2, h3, h4, h5, h6, p, figure, blockquote {margin: 0;}
img {max-width: 100%;height: auto;display: block;}
table {border-collapse: collapse;width: 100%;}
button, input, textarea {font: inherit;border: none;background: none;outline: none;}
button {cursor: pointer;}
a, button {-webkit-tap-highlight-color: transparent;}

/* 
Fonts and variables
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
@font-face {
    font-family: 'Nunito';
    src: url('../fonts/nunitosans.ttf') format('truetype');
}
::selection {
    background: #99999966;
}
:root {
    --b: #0e0e0e;
}

/* 
Main styling and nav
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--b);
    color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
h2 {
    font-size: clamp(2rem, 4.5vw, 5rem);
    line-height: clamp(2rem, 4.5vw, 5rem);
    padding-bottom: 25px;
}
h3 {
    margin-top: 25px;
    font-weight: 900;
}
a:hover {
    opacity: 1;
}
nav {
    position: fixed;
    top: 0;
    height: 75px;
    color: #eee;
    width: 300px;
    z-index: 99;
}
nav button {
    color: #eee;
    padding: 0 25px;
    font-size: 1.5rem;
    font-weight: 800;
    height: inherit;
}
nav button:hover {
    transform: rotate(360deg);
    transition: 0.4s ease-in-out;
}
aside {
    width: fit-content;
    padding: 175px 0 0 25px;
    font-weight: 700;
    line-height: 1.5rem;
    background-color: transparent;
    z-index: 9;
}
aside li {
    opacity: 0.5;
}
aside li {
    cursor: pointer;
    transition: 0.15s;
    position: relative;
    width: fit-content;
}
aside li:hover,
aside li.active,
#about li:hover {
    opacity: 1;
}
main {
    height: 100vh;
    padding-left: 300px;
    position: relative;
    flex: 1;
}
main > section {
    min-height: 100vh;
    box-sizing: border-box;
}
.hidden {
    position: fixed;
    left: -300%;
    opacity: 0;
}
#about, #values, #skills, #contact, #impressum, #data {
    padding: 0 12%;
    padding-top: 250px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

/*
About section
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
#about ul {
    display: flex;
    padding-inline-start: 4px;
    padding-bottom: 25px;
}
#about li {
    padding: 0 25px 0 0;
}
#about #intro-menu ul li {
    cursor: pointer;
    transition: 0.1s ease;
}
#about #intro-menu ul li.active {
    opacity: 1.0;
}
#about .text-container {
    display: none;
    font-size: clamp(2rem, 4.5vw, 5rem);
    line-height: clamp(2rem, 4.5vw, 5rem);
}
#about li {
    opacity: 0.5;
}

/*
Projects Section
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
#projects {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(auto-fit, minmax(100px, 1fr));
    justify-content: center;
    gap: 5px;
    position: relative;
    margin-left: -300px;
    width: calc(100% + 300px);
}
#projects .img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    left: 0;
    top: 0;
    z-index: 0;
}
#projects img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.2s ease-out, transform-origin 0.25s ease-out;
    will-change: transform;
    pointer-events: none;
}

/*
Values Section
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
#values {
    display: grid;
    grid-template-rows: 0fr;
}
#values li {
    font-size: clamp(2rem, 4.5vw, 5rem);
    line-height: clamp(2rem, 4.5vw, 5rem);
    position: relative;
}
#values li:last-child::after {
    width: 5px;
    height: 100%;
    display: block;
    content: '';
    background-color: #eee;
    position: absolute;
    right: -3%;
    top: 0;
    animation: blink 1s infinite;
}
@keyframes blink {
    0% {opacity: 0;}
    49% {opacity: 0;}
    50% {opacity: 1;}
    99% {opacity: 1;}
    100% {opacity: 0;}
}
#values * {
    width: fit-content;
}
#values p {
    margin-left: 50%;
}

/*
Skills section
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
#skills .icon-container {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}
#skills .icon-container img {
    width: 50px;
    height: auto;
}
#skills p {
    margin-right: 50%;
}

/*
Contact section
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
#contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}
#contact p {
    margin-bottom: 10px;
}
#contact a {
    opacity: 0.5;
    transition: 0.15s;
    padding-right: 25px;
}
#contact a:hover {
    opacity: 1;
}

/*
Footer section
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
footer {
    padding: 25px;
    margin: 0 auto;
    opacity: 0.5;
}

/*
Legal sections
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
#impressum, #data {
    padding-bottom: 200px;
}
#data ul {
    list-style-type: square;
    list-style-position: outside;
    margin-left: 1rem;
    margin-bottom: 10px;
}
#data li {
    margin-bottom: 5px;
}
.conceal {
    display: none!important;
}
#impressum h3, #data h3 {
    margin: 25px 0 10px;
}
#impressum h4, #data h4 {
    margin: 10px 0 5px 0;
    font-weight: 900;
    font-size: 1.1rem;
}
#impressum h5, #data h5 {
    margin: 5px 0 2px 0;
    font-weight: 900;
    font-size: 1rem;
}
#impressum p, #data p {
    margin-bottom: 10px;
}

/*
Scroll animation
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
.hide {
    opacity: 0;
    filter: blur(7px);
    transition: all 0.5s ease-out;
}
.hide#skills .icon-container img {
    transform: translateX(100vw);
    opacity: 0;
    filter: blur(7px);
    transition: all 0.5s ease-in-out;
}
.hide#skills .icon-container img:nth-child(1) {
    transition-delay: 100ms;
}
.hide#skills .icon-container img:nth-child(2) {
    transition-delay: 200ms;
}
.hide#skills .icon-container img:nth-child(3) {
    transition-delay: 300ms;
}
.hide#skills .icon-container img:nth-child(4) {
    transition-delay: 400ms;
}
.hide#skills .icon-container img:nth-child(5) {
    transition-delay: 500ms;
}
.reveal {
    opacity: 1;
    filter: blur(0);
}
.reveal#skills .icon-container img {
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
}

/*
Responsive
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""*/
@media(max-width: 1100px) {
    main {
        padding-left: 150px;
    }
    #projects {
        grid-template-columns: repeat(3, 1fr);
        margin-left: -150px;
        width: calc(100% + 150px);
    }
    #skills p {
        margin-right: 25%;
    }
}
@media(max-width: 800px) {
    main {
        padding-left: 0;
    }
    nav{
        width: 100%;
    }
    aside {
        transform: translateX(-300px);
        filter: blur(7px);
        width: 300px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;;
        transition: all 0.2s;
        transition-delay: 0ms;
        z-index: -1;
        backdrop-filter: blur(50px);
    }
    .show {
        transform: translateX(0);
        filter: blur(0);
    }
    #menu {
        position: relative;
        color: transparent;
    }
    #menu::after {
        content: "";
        width: 25px;
        height: 4px;
        display: block;
        position: absolute;
        left: 50%;
        transform: rotate(0deg) translateX(-40%);
        top: 30px;
        background-color: #eee;
        transition: all 0.25s ease-in-out;
    }
    #menu.change::after {
        transform: rotate(45deg) translate(20%, 22px);
        top: 15px
    }
    #menu::before {
        content: "";
        width: 25px;
        height: 4px;
        display: block;
        position: absolute;
        left: 50%;
        transform: rotate(0deg) translateX(-60%);
        top: 40px;
        background-color: #eee;
        transition: all 0.25s ease-in-out;
    }
    #menu.change::before {
        transform: rotate(-45deg) translate(-60%, -60%);
        top: 25px;
    }
    #about li {
        padding: 0 15px 0 0;
    }
    #projects {
        grid-template-columns: repeat(2, 1fr);
        margin-left: 0;
        width: 100%;
    }
    #about, #values, #skills, #contact, #impressum, #data {
        padding: 150px 5% 0 5%;
    }
    nav {
        width: 200px;
    }
    aside {
        padding: 150px 0 0 25px;
    }
}
@media(max-width: 700px) {
    #values p {
        margin-left: 0;
        margin-top: 25px;
    }
    #contact {
        grid-template-columns: repeat(1, 1fr);
        padding-bottom: 25px!important;
    }
}
@media(max-width: 600px) {
    html {
        font-size: 14px;
    }
    #skills p {
        margin-right: 0;
    }
    #skills .icon-container {
        gap: 15px;
    }
    #skills .icon-container img {
        width: 40px;
    }
}