/* Anchor offset for fixed header */

[id] {
    scroll-margin-top: calc(var(--header-height) + var(--site-gutter) + 4px);
}


/* PROJECTS */

section {
    padding-left: var(--site-gutter);
    padding-right: var(--site-gutter);
    padding-top: var(--gap);
}

ul#projects {
    list-style-type: none;
    font-size: var(--fs-xl);
    line-height: var(--line-height-xl);
    color: var(--color-font);
    font-feature-settings: "ss02";
}

ul#projects li img {
    display: none;
    width: 100%;
    height: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

ul#projects li img#preimg {
    position: absolute;
    z-index: -1;
    width: 400px;
}

ul#projects li a:link,
ul#projects li a:visited {
    color: var(--color-font);
    text-decoration: none;
    list-style-type: none;
}

ul#projects li a:hover,
ul#projects li a:active {
    color: var(--color-primary);
    -webkit-transition: color 0.35s ease-out;
    -moz-transition: color 0.35s ease-out;
    -o-transition: color 0.35s ease-out;
    transition: color 0.35s ease-out;
}

ul#projects li a:hover~img,
ul#projects li a:active~img {
    position: absolute;
    display: inline-block;
    width: auto;
    height: auto;
}


/* HEADER BUTTONS */

.header {
    position: fixed;
    top: var(--gap);
    left: var(--site-gutter);
    right: var(--site-gutter);
    height: var(--header-height);
    z-index: 100;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.name {
    display: none;
}

.nav {
    margin-left: auto;
    pointer-events: auto;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 6px;
}

.name a,
.nav-link {
    padding: 4px 6px;
    background-color: var(--color-secondary);
    border: 1px solid rgba(0, 0, 0, 0.025);
    border-radius: var(--border-radius);
    font-size: var(--fs-base);
    line-height: var(--line-height-base);
    color: var(--color-font);
    text-decoration: none;
    transition: background-color 0.25s ease;
    pointer-events: auto;
}

.nav-link:hover,
.nav-link:active,
.nav-link.is-active {
    background-color: var(--color-primary);
}


/* Erinnerungsschock */

#erinnerung {
    position: fixed;
    bottom: 0;
    left: 0;
    padding-bottom: var(--site-gutter);
    padding-left: var(--site-gutter);
    font-size: var(--fs-sm);
    letter-spacing: var(--lsp-sm);
    color: var(--color-font);
}

mark {
    background-color: var(--color-primary);
}

#mission_button {
    display: inline;
    cursor: pointer;
    user-select: none;
    /* supported by Chrome and Opera */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
}

#mission {
    display: none;
    position: fixed;
    width: 800px;
    bottom: 0;
    left: 0;
    padding-bottom: 40px;
    padding-left: var(--site-gutter);
    font-size: var(--fs-sm);
    letter-spacing: var(--lsp-sm);
    color: var(--color-font);
}


/* PHONE VERSION */

.gallery-container {
    display: none;
}

ul#projects_phone {
    display: none;
}


/* Mobile gallery pagination */

.gallery-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    pointer-events: none;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-secondary);
    transition: transform 0.2s ease;
}

.gallery-dot.is-active {
    background-color: var(--color-primary);
    transform: scale(1.4);
}

ul#projects_phone a {
    list-style: none;
    text-decoration: none;
    color: var(--color-font);
}

ul#projects_phone li img#preimg_phone {
    width: 100%;
    padding-top: var(--gap);
    padding-bottom: var(--gap);
}

a#projectname {
    float: left;
}

a#projectarrow {
    float: right;
}

a#projecttype {
    position: absolute;
    left: 50%;
}

li.project_phone:active {
    opacity: 0.7;
}


/* TYPO STYLES */

.text_about_phone {
    display: none;
}


/* BODY */

#info {
    width: 100%;
    padding-top: 30px;
    padding-bottom: 20px;
}

#experience {
    width: 100%;
    padding-bottom: 20px;
}

#mission_phone {
    display: none;
}

#mission_phone_button:hover {
    cursor: pointer;
    user-select: none;
    /* supported by Chrome and Opera */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
}


/* Legal */

#imprint {
    display: none;
}

#imprint_button:hover {
    cursor: pointer;
    user-select: none;
    /* supported by Chrome and Opera */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
}


/* CONTACT – give it its own screen */

#contact {
    padding-top: 30px;
    padding-bottom: 75vh;
}


/* Back to top spacing */

#backtotop {
    text-align: center;
}

#backtotop_button {
    display: block;
    text-align: center;
    font-size: var(--fs-xl);
    line-height: var(--line-height-xl);
}

#backtotop_button a:link,
#backtotop_button a:visited {
    text-decoration: none;
    color: var(--color-font);
}


/* RESPONSIVENESS */

@media screen and (max-width: 800px) {
     :root {
        --site-gutter: 10px;
        --header-height: 32px;
    }
    .header {
        pointer-events: auto;
    }
    .gallery-container {
        display: block;
        position: relative;
        margin-top: var(--gap);
        margin-bottom: var(--gap);
    }
    .gallery-inner {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE 10+ */
    }
    .gallery-inner::-webkit-scrollbar {
        display: none;
    }
    .gallery-inner,
    .gallery-inner li {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    li.image {
        flex: 0 0 100%;
        scroll-snap-align: center;
        list-style: none;
    }
    ul.gallery-inner img {
        width: 100%;
        display: block;
    }
    /*DISABLE DESKTOP APPLICATIONS*/
    #erinnerung {
        display: none;
    }
    ul#projects {
        display: none;
    }
    /* ENABLE PHONE APPLICATIONS*/
    .name {
        display: block;
    }
    .text_about_phone {
        display: block;
    }
    /*ADAPT SIZES*/
    footer {
        height: 20px;
    }
    ul#nav_list {
        font-size: var(--fs-sm);
        letter-spacing: var(--lsp-sm);
        top: var(--gap);
        right: var(--site-gutter);
    }
    ul#projects_phone {
        display: block;
        margin-top: var(--content-offset);
        border-top: thin solid var(--color-font);
    }
    li.project_phone {
        padding-bottom: var(--gap);
        border-bottom: thin solid var(--color-font);
    }
}