:root {
    font-family: oxanium-font;
    --col-main:      rgb(99, 126, 110);
    --col-sec-dark:  rgb(159, 202, 176);
    --col-sec-light: rgb(223, 223, 223);
    --col-text-light:rgb(248, 248, 248);
    --col-text-dark: rgb(24, 24, 24);
    --col-moon: rgb(248, 248, 248);
    --col-sun: rgb(255, 244, 97);
    --col-em: rgb(64, 82, 71);
    --col-sec-light-acc: rgb(210, 210, 210);
}

[data-theme="dark"] {
    --col-main:      rgb(38, 49, 43);
    --col-sec-dark:  rgb(159, 202, 176);
    --col-sec-light: rgb(67, 87, 76);
    --col-text-dark: rgb(248, 248, 248);
    --col-text-light:rgb(24, 24, 24);
    --col-em: rgb(134, 175, 150);
    --col-sec-light-acc: rgb(56, 73, 64);
}

@font-face {
    font-family: oxanium-font;
    src: url('fonts/Oxanium/static/Oxanium-Medium.ttf');
}
body, html {
    overflow-x: hidden;  /* needed to prevent being able to swipe to the right where on mobile lies the navigation hidden */
}

body {
    padding: 0;
    margin: 0;
    background-color: var(--col-sec-light);
    color: var(--col-text-dark);
    width: 100vw;
    position: relative;;
}

img {
    background-repeat: no-repeat;
    background-size: cover;
    max-width: 100%;
    font-style: italic;
    height: auto;
    vertical-align: middle;

}

.main-grid {
    display: grid;
    grid-template-columns: minmax(20ch, 20%) 80%;
    align-items: center;
    min-height: 100dvh;
    overflow: hidden;
}



.sidebar {
    display: grid;
    background-color: var(--col-main);
    height: 100%;
    align-items: center;
    justify-items: center;
}

/* NAVIGATION */
#logo-img {
    max-width: max(80%, 20ch);
    aspect-ratio: 480/100;
    filter: drop-shadow(3px 3px 23px  var(--col-text-dark));
}

.main-nav {
    filter: drop-shadow(3px 3px 30px  var(--col-text-dark));
    min-width: 60%;
}
.main-nav ul {
    list-style-type: none;
    padding: 0;
    line-height: 2em;
}

.main-nav ul a{
    padding-left: .5em;
}
.main-nav ul a {
    text-decoration: none;
    color: var(--col-text-light);
    display: flex;
    align-items: center;
}
.icon {
    width: 1rem;
    aspect-ratio: 1;
    margin-right: 1em;
}

nav hr {
    border: none;
    height: 1px;
    border-width: 0;
    background-color: var(--col-sec-light);
    margin-block: 2rem;
}

.icon-color {
    stroke: yellow;
    fill: yellow !important;
}

[data-theme="dark"] .icon  {
    fill: var(--col-text-dark);
}
[data-theme="light"] .icon  {
    fill: var(--col-text-light);
}

[data-theme="dark"] .main-nav ul a  {
    color: var(--col-text-dark);
}

.main-nav ul a:hover,
.main-nav ul a:hover .icon {
    color: var(--col-sun);
    fill: var(--col-sun);
}

a[aria-current="page"],
a[aria-current="page"] svg {
    color: var(--col-sun) !important;
    fill: var(--col-sun) !important;
    font-weight: bold;
}

a {
    color: var(--col-em);
    text-decoration: underline;
}
a:hover {
    text-decoration: none;
}

#theme-toggle {
    border: unset;
    border-radius: 50%;
    width: 30px;
    aspect-ratio: 1/1;
    cursor: pointer;
}

#theme-toggle__rays {
    fill: var(--col-sun);
    width: 60px;
    height: 60px;
    position: absolute;
    translate: -75% -25%;
    pointer-events: none;
}

.day {
    box-shadow: 0px 0px 0 var(--col-moon);
    background-color: var(--col-sun);
}

.night {
    box-shadow: 5px 2px 0 var(--col-moon);
    background-color: unset;
}


[data-theme="dark"] #theme-toggle__rays {
    opacity: 0;
    rotate: 80deg;
}

@media (min-width: 800px) {

    [data-theme="dark"] #theme-toggle:hover {
        background-color: rgba(255, 255, 0, 0.2);
        transition: .2s;
    }
    [data-theme="light"] #theme-toggle:hover {
        background-color: rgba(255, 255, 0, 0.2);
        box-shadow: 5px 2px 0 var(--col-moon);
        transition: .2s;
    }
    [data-theme="dark"] #theme-toggle:hover ~ svg {
        fill: rgba(255, 255, 0, 0.2);
        rotate: 80deg;
        transition: .2s;
        opacity: 1;
        clip-path: polygon(20% 0%, 0% 0%, 0 100%,
        100% 100%, 100% 80%);
    }
    [data-theme="dark"] #theme-toggle:not(:hover) ~ svg {
        opacity: 0;
        clip-path: polygon(20% 0%, 0% 0%, 0 100%,
        100% 100%, 100% 80%);
    }
    [data-theme="light"] #theme-toggle:hover ~ svg {
        rotate: 80deg;
        transition: .2s;
        fill: rgba(255, 255, 0, 0.1);
        clip-path: polygon(20% 0%, 0% 0%, 0 100%,
        100% 100%, 100% 80%);
    }
    [data-theme="light"] #theme-toggle:not(:hover) ~ svg {
        rotate: 30deg;
        transition: .2s;
        clip-path: inset(0);
    }
}

[data-theme="dark"] .sidebar > * {
    filter: none !important;
}

/* OVERLAY */
#overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, .8);
    display: none;
}


#overlay img {
    max-height: 100%;
    margin: 2em;
    object-fit: contain;
}

#overlay button {
    position: absolute;
    right: 1em;
    top: 1em;
    height: 2em;
    width:  2em;
    cursor: pointer;
    font-size: xx-large;
    background-color: var(--col-sec-dark);
    border-radius: 3px;
    border-style: none;
    padding: 0;
}

#overlay button:hover {
    background-color: var(--col-main);
}

/* CONTENT */

.content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    box-sizing: border-box;
}

.divider {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    padding-block: 1em;
    margin-bottom: 1em;

}


section.divider:nth-child(odd) {
    background-color: var(--col-sec-light-acc);
}

@media (max-width: 800px) {
    section.divider {
        border-style: none;
    }

    /* mark the text part of the sections to move them last on mobile since mages are more interesting */
    .division-text {
        order: 2;
    }

}

@media (min-width: 800px) {
    section.divider {
        margin-bottom: 3em;
    }

    .divider:nth-child(even) > article {
        order: 2;
    }
    .divider:nth-child(oddn) > article {
        order: 1;
    }

    .unfold-btn {
        display: none;
    }

}

section.divider {
    margin-bottom: 1em;
}


.divider img {
    max-width: 100%;
    max-height: calc(100vh);
    object-fit: cover;
    object-position: top left;
}

.dark {
    display: flex;
    background-color: var(--col-sec-dark);
    justify-content: center;
    padding: 1em;
}

.division {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-inline: 1em;
}



.title {
    text-align: center;
    height: 1em;
    padding: 1em;
    margin: 0;
    background-color: var(--col-sec-light-acc);
}

.break {
    display: block;
}

article {
    padding: .5em;
    margin: .5em;
}

.margin-left {
    padding-left: .5em;
    margin-left: .5em;
}


/* GRAPHICS */

.carousel {
    max-width: 100%;
    aspect-ratio: 5/2;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 1em;
}

.carousel-nav {
    height: 15px;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.carousel-button {
    display: inline-block;
    height: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background-color: var(--col-main);
    opacity: .5;
    border: none;
    cursor: pointer;
}

.carousel-button:hover {
    opacity: 1;
}

.carousel-button[aria-current="step"] {
    outline: 2px solid var(--col-text-dark);
}

.carousel-content {
    flex-grow: 2;
    height: 100%;
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: mandatory;
    /* pointer-events: none; */
}

.slide {
    max-height: 100%;
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    background-color: var(--col-sec-dark);

}

.slide img {
    object-fit: cover;
    width: 100%;
}

.carousel-content::-webkit-scrollbar {
    display: none;
}

.carousel-content {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}


#carousel-pause {
    height: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    border: none;
    background-color: transparent;
    box-shadow:
         .35em 0 0 0 var(--col-sec-dark) inset,
        -.35em 0 0 0 var(--col-sec-dark) inset;
}

#carousel-pause.paused {
    clip-path: polygon(0 0, 100% 50%, 0 100% );
    box-shadow: none;
    background-color: var(--col-sec-dark);
}

.image-gallery {
    display: grid;
    gap: .1em;
    grid-template-columns: repeat(3,1fr);
    grid-auto-rows: 1fr;
    padding-inline: .1em;
    justify-items: center;
    height: 100%;
}

.tile {
    max-width:fit-content;
    border-radius: 5px;
    /* background-color: var(--col-sec-dark); */

    animation: loading 1s linear infinite;
    animation-direction: alternate;
    background-attachment: fixed;
}


.tile img {
    border-radius: 5px;
    width:  100%;
    object-fit: cover;
    height: 100%;
    transition: .3s;
    cursor: pointer;
}

.square {
    grid-column: span 1;
}
.wide {
    grid-column: span 3;
}

@media (min-width: 800px) {
    .horizontal {
        grid-column: span 2;
    }
    .image-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: .5em;
        padding-inline: .5em;
    }
}

@media (min-width: 1900px) {
    .image-gallery {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* NIGHT MODE */

#nav-open-btn {
    display: none;
    background-color: var(--col-main);
    border-style: none;
    border-bottom-left-radius: 5px;
    border-top-left-radius: 5px;
    height: 3em;
    font-size: x-large;
    width: 15%;
    color: var(--col-text-light);
    z-index: 100;
    cursor: pointer;
}

@media only screen and (max-width: 800px) {
    .main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: max-content;
    }

    .sidebar {
        position: absolute;
        top: 0;
        right: -80%;
        z-index: 100;
        height: 100svh;
        width: 80vw;

    }

    @keyframes open-nav {
        to { right: 0%; }
    }
    @keyframes close-nav {
        from { right: 0%; }
        to { right: -80%; }
    }

    @keyframes open-nav-btn {
        to { right: 80%; }
    }
    @keyframes close-nav-btn {
        from { right: 80%; }
        to { right: 0%; }
    }


    .main-nav {
        width: 80%;
        overflow-x: scroll;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    #nav-open-btn {
        display: block;
        position: absolute;
        right: 0%;
        bottom: 10%;
    }


    #logo-img {
        max-width: max(50%, 20ch);
    }

    .nav-open {
        animation: open-nav .5s ease-out forwards;
    }
    .nav-close {
        animation: close-nav .5s ease-out forwards;
    }
    .nav-open-btn {
        animation: open-nav-btn .5s ease-out forwards;
    }
    .nav-close-btn {
        animation: close-nav-btn .5s ease-out forwards;
    }


    .main-nav::-webkit-scrollbar {
        display: none;
    }


    .icon {
        width: 1em;
    }

    .content {
        max-height: 100%;
        overflow-y: visible;
    }

    .carousel {
        height: 50vh;
    }
    .divider {
        display: grid;
        grid-template-columns: 1fr;
    }

}


/* FILMS */
video {
    max-width: 100%;
}

iframe[title="YouTube video player"] {
    aspect-ratio: 16/9;
}

.youtube-cookie-warning {
    aspect-ratio: 16/9;
    background-color: var(--col-sec-dark);
    position: absolute;
    display: grid;
    grid-template-areas:
        'text text'
        'btn-decline btn-accept'
    ;
    padding: 1em;
    box-sizing: border-box;
    gap: 1em;
    opacity: 0;
    transition: .7s;
    cursor: pointer;
    text-align: center;
}

.youtube-cookie-warning > * {
    pointer-events: none;
}

.youtube-cookie-warning button {
    font-family: inherit;
    border-style: none;
    cursor: pointer;
}
.youtube-cookie-warning span {grid-area: text;}
.youtube-cookie-warning button:nth-of-type(1) {grid-area: btn-decline;}
.youtube-cookie-warning button:nth-of-type(2) {
    grid-area: btn-accept;
    background-color: var(--col-main);
}
.youtube-cookie-warning button:nth-of-type(2):hover {
    opacity: .9;
}


.image-grid {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
    align-items: center;
    justify-content: space-around;
}

@media (max-width: 800px) {
    .image-grid {
        grid-template-columns: 3fr;
    }
}

.image-grid img {
    cursor: pointer;
    min-width: 10ch;
    aspect-ratio: 16/9;
    border-style: none;
}

/* PROGRAMMING */
#instagram-graph svg {
    width: 100%;
    height: 100%;
    /* aspect-ratio: 2/1; */
    border-radius: 5px;
    box-shadow: 1px 1px 5px var(--col-main) inset;
    cursor: grab;
    stroke: var(--col-text-dark);
}
#instagram-graph svg path {
    stroke-opacity: .4;
    fill:none;
}

circle {
    fill: var(--col-main);
}


[data-theme="dark"] circle {
    fill: var(--col-sun);
}
[data-theme="dark"] path {
    stroke: var(--col-sun);
}

/* Impressum */
.contact-table td:first-child {
    text-align: end;
    padding-right: 1em;
    vertical-align: text-top;
}

@media (min-width: 800px) {
    .spotify article {
        columns: 2;
    }
}
.spotify h4,
.spotify p {
    margin: .4em;
}

.spotify {
    height: min-content;
}

#svg5  {
    margin: auto;
    width: 100%;
    height: max-content;
}



/* DATENSCHUTZ */
@media (min-width: 800px) {
    #datenschutz {
        columns: 2;
        text-align: justify;
    }
}
@media (min-width: 1200px) {
    #datenschutz {
        columns: 3;
    }
}