@import "theme.css";

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: "Ysabeau Infant", sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--color-background);
    color: var(--color-on-background);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    min-height: 8vh;
    background-color: var(--color-primary-container);
    color: var(--color-on-primary-container);
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}

header .logo svg {
    width: 50px;
    height: 50px;
    margin-left: 20px;
}

header .logo h1 {
    color: var(--color-on-background);
}

.logo:hover path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: dash 1s linear alternate infinite;
}

@keyframes dash {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 1;
  }
}

header ul {
    display: flex;
    justify-content: space-around;
    width: 40rem;
}

header li {
    list-style: none;
}

header a {
    font-size: 20px;
    text-decoration: none;
    color: var(--color-on-primary-container);
}

header nav a::after, header nav a::before {
    color: var(--color-tertiary);
    display: inline-block;
    width: 1ch;
}

header nav a::after {
    content: "]";
}

header nav a::before {
    content: "[";
    text-align: right;
}

header nav a:hover::after {
    content: ")";
}

header nav a:hover::before {
    content: "(";
}

.selected {
    color: var(--color-on-background);
}

.selected::after {
    content: "}";
}

.selected::before {
    content: "{";
}

.burger-hide {
    display: none;
    position: absolute;
    left: 0px;
    height: 92vh;
    top: 8vh;
    width: 50%;
}

.burger-toggle {
    display: none;
    
    &:checked {
        &~ nav ul {
            transform: translateX(0%);
        }
        &~ label div .line1{
            transform: rotate(-45deg) translate(-7px, 7px);
        }
        &~ label div .line2{
            transform: translateX(10%);
            opacity: 0;
        }

        &~ label div .line3{
            transform: rotate(45deg) translate(-7px, -7px);
        }
        &~ .burger-hide {
            display: block;
        }
    }
}

header label {
    margin-left: auto;
}

.burger{
    display: none;
    cursor: pointer;
}

.burger div{
    width: 30px;
    height: 5px;
    background-color: white;
    margin: 5px;
    margin-right: 20px;
    transition:  all 0.3s ease;
}

footer {
    position: sticky;
    top: 100vh;
    text-align: center;
    margin-top: 3rem;
    font-size: 0.8rem;
    background-color: var(--color-surface-container);
    color: var(--color-on-surface-container);
}

footer table {
    margin: 0 auto;
}

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

footer a {
    text-decoration: none;
    color: var(--color-on-surface-container);
}

footer a:hover:not(.logo) {
    text-decoration: underline;
}

@media screen and (max-width:768px){
    body {
        overflow-x: hidden;
    }
    header ul{
        position: absolute;
        z-index: 1;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--color-primary-container);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in;
    }
    .burger{
        display: block;
    }
}
