/*  Reset */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

ul,
li {
    list-style-type: none;
}

iframe {
    border: 0;
}

input {
    border-radius: 0;
    -webkit-appearance: none;
}

:focus {
    border: 0px;
    outline: none;
}

:root {
    --color-bg: rgba(244, 241, 241, 0.95);
    --color: rgba(0, 0, 0, 0.9);
    --font-size-2: 2rem;
    --font-size-3: 1.25rem;
}

/*  Typography */

@font-face {
    font-family: 'IBM';
    src: url('fonts/ibm-regular.woff2') format('woff2'),
        url('fonts/ibm-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body,
html,
h1,
h2,
h3,
h4,
::placeholder,
input,
button,
small {
    font-family: 'IBM', Arial, Helvetica, sans-serif;
    letter-spacing: 0.02em;
    font-size: 16px;
    line-height: 1.2em;
    font-weight: normal;
    font-style: normal;
    color: var(--color)
}

a {
    color: initial;
    text-decoration: none;
}

a:hover {
    color: initial;
}

p {
    padding: 0;
    margin: 0;
}

/*  Common */
html,
body {
    background: var(--color-bg);
}

body[data-layer] {
    overflow: hidden;
}

.content {
    min-height: calc(100vh - 4em);
}

/*  Header */

h1.logo {
    display: none;
}

h1.logo::after {
    content: 'Menu';
    position: absolute;
    right: 1.25em;
    cursor: pointer;
}

header {
    padding: 1.25em 2em;
    position: sticky;
    top: 0;
    z-index: 100;
}

header::before {
    content: ' ';
    position: absolute;
    z-index: -1;
    top: -25%;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(0.25em);
    filter: blur(0.3em);
    background: rgba(255, 255, 255, 0.3);
}

header a:hover {
    border-bottom: 1.5px var(--color) solid;
}

nav ul {
    display: flex;
    gap: 1em;
}

.content,
.content h1,
.content h2,
.content h3 {
    font-size: var(--font-size-2);
    line-height: 1.25em;
}

.active-language {
    display: none;
}

/*  Footer */
footer {
    padding: 1.25em 2em;
    display: flex;
    justify-content: space-between;
}

/* Home */
.home-gallery figure {
    display: none;
    width: 100%;
    height: calc(100vh - 4em);
    mix-blend-mode: multiply;
}

.home-gallery figure.visible {
    display: block;
}

.home-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/*  List */
.list,
.page {
    padding: 1em 3em;
    max-width: 45em;
    margin: auto;
}

.list {
    margin-bottom: 2em;
}

.list-header {
    display: flex;
    justify-content: space-between;
}

.list h1 {
    text-align: center;
    padding-bottom: 1.5em;
}

.list h3 {
    text-align: center;
    padding: 1em 1em 0.5em 1em;
}

.list ul {
    display: block;
    max-width: 40em;
    padding: 0;
    list-style: none;
}

.list li {
    position: relative;
    mix-blend-mode: multiply;
    text-decoration: none;
    display: grid;
    grid-template-columns: auto max-content;
    align-items: end;
}

.list li span:last-child {
    text-align: right;
}

.list li span:first-child {
    position: relative;
}

.list li span:first-child::after {
    position: absolute;
    top: 0.25em;
    padding: 0 1em;
    content: " . . . . . . . . . . . . . . . . . . . "
        ". . . . . . . . . . . . . . . . . . . . . . . "
        ". . . . . . . . . . . . . . . . . . . . . . . "
        ". . . . . . . . . . . . . . . . . . . . . . . "
        ". . . . . . . . . . . . . . . . . . . . . . . "
        ". . . . . . . . . . . . . . . . . . . . . . . "
        ". . . . . . . . . . . . . . . . . . . . . . . ";
    text-align: right;
    font-size: 1rem;
    height: 2em;
    overflow: hidden;

}

.list li a {
    position: relative;
}

.list li a:hover {
    border-bottom: 0;
}

.list li a .thumbnail {
    position: absolute;
    top: -0.5em;
    left: -2.5em;
    z-index: 100;
    width: 2em;
    height: 2em;
    object-fit: cover;
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: 100;
}

.list li a:hover .thumbnail {
    opacity: 1;
}

/*  Detail page */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    background: var(--color-bg);
    z-index: 100;
}

.close {
    font-size: 1rem;
    padding: 0.5em 2em;
    position: fixed;
    top: 0;
}

.overlay-content {
    padding: 2em;
    max-width: 40em;
    margin: auto;
}

.no-bottom {
    padding-bottom: 0;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    padding: 1em 0;
}

.overlay-abstract {
    padding: 0 0 2em 0;
}

.overlay-blocks {
    padding-bottom: 1em;
}

.block {
    padding: 0 0 2em 0;
}

.paragraph p {
    font-size: var(--font-size-3);
    line-height: 1.25em;
    max-width: 35em;
    margin: auto;
    text-indent: 2.5em;
}

.images[data-images="2"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.images figure {
    text-align: center;
    line-height: 0;
    max-width: 20rem;
    margin: auto;
}

.images figure img {
    width: 100%;
}

.paragraph p:first-child {
    text-indent: 0;
}

figcaption {
    font-size: 1rem;
    line-height: 1.25em;
    text-align: center;
    padding-top: 0.75em;
}

.overlay-list.list {
    padding: 0 0 2.5em 0;
    margin-bottom: 0;
}

.overlay-list .list-header {
    padding-bottom: 1em;
}

.overlay-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5em 1em;
    padding-bottom: 2em;
}

.overlay-gallery figure {
    background: var(--color-bg);
    cursor: pointer;
}

.overlay-gallery img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 3/2;
    mix-blend-mode: multiply;
    filter: grayscale();
    pointer-events: none;
}

.zoom-modal {
    background: transparent;
    cursor: pointer;
    backdrop-filter: blur(0.2em);
    -webkit-backdrop-filter: blur(0.2em);
}

.zoom-modal * {
    pointer-events: none;
}

.zoom-modal img {
    width: 100%;
    height: 100vh;
    object-fit: contain;
    padding: 1em;
}

.form figure {
    width: 100%;
    line-height: 0;
}

.form img {
    width: 100%;
    pointer-events: none;
}

/*  Collection */
.page-title {
    text-align: center;
    padding-bottom: 1em;
}

.page-abstract {
    padding-bottom: 2em;
}

.books {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em 2.5em;
    padding-bottom: 3em;
}

.books-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    object-position: bottom;
}

a.zoom {
    display: inline-block;
    transition: transform 0.1s ease;
}

a.zoom:hover {
    transform: scale(1.1)
}

.links-lists {
    font-size: var(--font-size-3);
    line-height: 1.25em;
    max-width: 35em;
    margin: auto;
}

.links-lists p {
    padding-bottom: 1.2rem;
}

.links-lists ol {
    list-style-type: decimal;
    padding-bottom: 2em;
}

.links-lists li {
    list-style-type: decimal;
    padding-left: 1em;
    margin-left: 2em;
}

/*  Media Query */
@media only screen and (max-width: 768px) {

    body,
    html,
    h1,
    h2,
    h3,
    ::placeholder,
    input,
    button,
    small {
        font-size: 16px;
    }

    :root {
        --font-size-2: 1.5rem;
        --font-size-3: 1.25rem;
    }

    h1.logo {
        display: block;
        z-index: 30;
    }

    header {
        padding: 1.25em;
        position: sticky;
        top: 0;
    }

    nav {
        position: fixed;
        z-index: -1;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        background: var(--color-bg);
        display: none;
    }

    .menu-open nav {
        display: block;
    }

    .menu-open h1.logo::after {
        content: attr(data-menu-switch);
        text-indent: 0;
    }

    .menu-open h1.logo {
        text-indent: -100vw;
    }

    nav ul {
        padding: 2em 1em;
        font-size: var(--font-size-2);
        line-height: 1.25em;
        display: block;
    }

    .list,
    .page {
        padding: 1em;
    }

    footer {
        flex-direction: column;
        gap: 1em;
        padding: 1.25em;
    }

    .close {
        right: 0;
        padding: 1em 1.25em;
    }

    .overlay-content {
        padding: 1.25em
    }

    .overlay-header {
        flex-direction: column;
    }

    .thumbnail {
        display: none;
    }

    .overlay-gallery,
    .books {
        grid-template-columns: repeat(2, 1fr);
    }
}