@font-face {
    font-family: 'AG Old Face';
    src: url('../fonts/AGOldFace-Regular.woff2') format('woff2'),
         url('../fonts/AGOldFace-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'AG Old Face';
    src: url('../fonts/AGOldFace-Italic.woff2') format('woff2'),
         url('../fonts/AGOldFace-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}

strong, b {
    font-weight: normal;
}

:root {
    --font-size: 1.8vw;
    --line-height: 2vw;
    --font-color: #000000;
    --speed: 750ms;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'AG Old Face', Helvetica, Arial, sans-serif;
    font-size: var(--font-size);
    line-height: var(--line-height);
    color: var(--font-color);
}

html, body {
    scroll-behavior: smooth;
}

body.page-works {
    overflow: hidden;
}

a {
    cursor: pointer;
    color: inherit;
}

.scroll {
    overflow: auto !important;
}

::selection {
  background-color: black;
  color: white;
}

img {
    -khtml-user-select: none;
    -o-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

/* lazy loading */

img.lazy,
figcaption.lazy {
    opacity: 0;
}

img.initial,
img.loaded,
img.error,
figcaption.entered {
    opacity: 1;
}

img:not([src]):not([srcset]) {
  visibility: hidden;
}

/* nav */

nav {
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    font-size: 2.95em;
    line-height: 0.825em;
    letter-spacing: -0.015em;
    z-index: 5;
    opacity: 0;
    transition: opacity var(--speed);
    pointer-events: none;
}

nav.loading li a {
    opacity: 1 !important;
    pointer-events: none;
}

nav > * {
    pointer-events: all;
}

nav.show {
    opacity: 1;
}

nav a {
    text-decoration: none;
}

.logo, .thumbnail-icon {
    opacity: 1;
    transition: opacity 300ms;
}

.logo {
    height: 8.5vw;
}

.thumbnail-icon {
    height: 8.1vw;
    position: absolute;
    bottom: 0;
    cursor: pointer;
}

.logo img,
.thumbnail-icon img {
    display: block;
    height: 100%;
    width: auto;
}

.logo.hide,
.thumbnail-icon.hide,
.thumbnail-icon.show.hide {
    opacity: 0;
}

.thumbnail-icon.hide,
.thumbnail-icon.show.hide {
    pointer-events: none;
}

nav h1,
.thumbnail-icon {
    display: inline-block;
    margin: 0;
    font-weight: inherit;
    font-size: inherit;
    padding: 2vw 2vw 2vw 2vw;
}

nav ul {
    margin: 0;
    padding: 2vw 2vw 2vw 2vw;
    list-style: none;
    pointer-events: none;
    opacity: 1;
    transition: opacity 300ms;
}

nav ul.hide {
    opacity: 0;
}

nav.show .categories,
nav.show .menu-pages {
    pointer-events: all;
}


nav.show .categories.hide,
nav.show .menu-pages.hide {
    pointer-events: none;
}

nav ul li a {
    opacity: 25%;
    position: relative;
    display: block;
    height: 4.5vw;
}

nav ul li a:hover, nav ul li a.active {
    opacity: 100%;
}

.transition {
    transition: opacity 300ms;
}

.essays-menu li a p {
    transition: opacity 300ms;
    opacity: 25%;
}

.essays-menu li a:hover p, .essays-menu li a.active p {
    opacity: 100%;
}

/* years menu */

.years-menu {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: fixed;
    z-index: 4;
    overflow: hidden;
    opacity: 1;
    transition: opacity 300ms;
}

.years-menu.scroll {
    overflow: scroll;
}

.years-menu.open {
    overflow: hidden;
    pointer-events: none;
}

.years-menu.hide {
    opacity: 0;
}

.years-menu ul {
    position: absolute;
    width: 100%;
    margin: 0;
    opacity: 1;
    padding: 1vw 0;
    list-style: none;
    text-align: center;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: transform var(--speed);
}

.years-menu li {
    margin: 0 auto;
    height: 5.5vw;
    margin-bottom: 0;
    transition: margin-bottom var(--speed), opacity 300ms, height 300ms;
    opacity: 1;
    /*display: block;*/
}

.years-menu.open li.hidden {
    /*display: none;*/
    height: 0;
    opacity: 0;
}

.years-menu li.hide, .years-menu li.hidden {
    opacity: 0;
    cursor: default;
}

.years-menu li.hidden a, .years-menu li.hidden img {
    cursor: default;
}

.years-menu li.hide-to-show {
    opacity: 0;
}

.years-menu li.hide-to-show.show {
    opacity: 1;
}

.years-menu li.show {
    opacity: 1 !important;
}

.years-menu li a {
    pointer-events: all;
}

.years-menu li img {
    height: 100%;
    pointer-events: all;
}

.years-menu li.active {
    margin-bottom: 0;
}

.years-menu.open li.active {
    margin-bottom: calc(100vh - 7vw);
}



/* about, essays, and news */

.content {
    padding: 2vw 2vw 2vw 35vw;
    opacity: 1;
    transition: opacity 300ms;
}

.content.hide {
    opacity: 0;
}

.content p {
    margin: 0 0 2vw 0;
}



/* essays */

.page-essay nav {
    pointer-events: none;
}

.essays-menu {
    opacity: 100%;
    transition: opacity 300ms;
}

.essays-menu.hide {
    opacity: 0;
}

.essays-menu ul {
    overflow-x: auto;
    margin: 0;
    padding: 0;
    list-style: none; 
    white-space: nowrap;
}

.essays-menu ul::-webkit-scrollbar {
  display: none;
}

.essays-menu ul {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.essays-menu li {
    display: inline-block;
    vertical-align: top;
    width: 20vw;
    padding-right: 2vw;
    white-space: normal;
}

.essays-menu li:first-child {
    margin-left: 35vw;
}

.essays-menu li:last-child {
    width: 65vw;
}

.essays-menu li a {
    text-decoration: none;
}

.essay {
    display: none;
    padding-right: 2vw;
}

.essay h1, .essay h2, .essay h3, .essay h4, .essay h5, .essay h6 {
    font-size: inherit;
    font-weight: inherit;
    margin: 1em 0 1em 2em;
}

.essay.active {
    display: block;
    height: auto;
    z-index: 1;
}

.essay a {
    word-break: break-all;
}

.credits {
    font-size: 0.65em;
    line-height: 1.3em;   
}

sup.footnote {
    vertical-align: top;
    position: relative;
    top: -0.4rem;
    font-size: 0.65em;
    letter-spacing: -0.1em;
    margin-right: 0.3em;
}

sup.footnote a,
.footnotereverse a {
    text-decoration: none;
}

.footnotes-list {
    font-size: 0.65em;
    line-height: 1.3em;
    margin-top: 3rem;
    padding-left: 1.25rem;
    margin-left: 0.5rem;
}

.footnotes-list li {
    margin: 1.3rem 0;
}

.ui-tooltip {
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    background: none;
    max-width: 50vw !important;
}

.hover-image {
    width: 100%;
    max-width: 300px;
}

.ui-tooltip, 
.ui-tooltip-content,
.ui-tooltip picture {
    display: inline-block;
}


/* news */

.news-wrapper ul {
    display: flex;
    flex-wrap: wrap;
    grid-gap: 1.5vw;
    grid-row-gap: 2vw;
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-wrapper li {
    width: calc(33.333% - 3vw/3);
}

.news-wrapper a {
    text-decoration: none;
}

.news-wrapper img {
    filter: blur(0);
    transition: filter 300ms;
}

.news-wrapper a:hover img {
    filter: blur(0.5vw);
}

.news-wrapper figure {
    margin: 0;
    padding: 0;
}

.news-wrapper figure .image-wrapper {
    aspect-ratio: 4 / 3;
}

.news-wrapper figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile {
    display: none;
}


/* large screen */
@media (min-width: 1920px) {
 
}

/* tablet landscape */
@media (max-width: 1400px) and (pointer: coarse) {

    :root {
        --font-size: 2.8vw;
        --line-height: 1.2em;
    }
    .mobile {
        display: block;
    }
    .content p {
        margin: 1.2em 0;
    }
    nav {
        opacity: 1;
        width: 100%;
        font-size: 7vw;
        pointer-events: none;
    }
    nav h1,
    .thumbnail-icon {
        padding: 4vw;
    }
    nav ul {
        padding: 0vw 4vw 0vw 4vw;
        transition: opacity 300ms;
        pointer-events: all;
        width: 80vw;
    }
    nav ul.hide {
        opacity: 0;
        pointer-events: none;
    }
    nav ul.menu-pages {
        padding-top: 4vw;
    }
    nav ul li a {
        display: inline-block;
        height: auto;
    }
    .logo,
    .thumbnail-icon {
        height: 14vw;
        pointer-events: all;
    }
    .thumbnail-icon {
        height: 11.2vw;
    }
    .logo.show,
    .thumbnail-icon.show {
        opacity: 1;
    }
    .years-menu ul {
        text-align: right;
        padding: 3vw;
        transition: transform 300ms;
    }
    .years-menu li {
        transition: margin-bottom 300ms, margin-top 300ms, opacity 300ms;
        height: 7vw;
        opacity: 1;
        margin-top: 0;
    }
    .years-menu.open li {
        pointer-events: none;
    }
    .years-menu.open li.active {
        pointer-events: all;
        margin-top: 3.5vw;
    }
    .years-menu li.active {
        margin-top: 0;
    }

    .years-menu li:first-child.active {
        margin-top: 0;
    }
    .content {
        padding: 4vw;
        line-height: 1.1em;
        transition: opacity 300ms, filter 300ms;
    }
    .essays-menu {
        transition: opacity 300ms, filter 300ms;
    }
    .content.blur, .page-title.blur, .essays-menu.blur {
        filter: blur(2vw);
        opacity: 0.4;
    }
    nav ul.hide li {
        pointer-events: none;
    }
    .news-wrapper ul {
        grid-gap: 2vw;
        justify-content: space-between;
    }
    .news-wrapper li {
        width: calc(33% - 2vw);
        padding-bottom: 6vw;
    }
    .news-wrapper a:hover img {
        filter: blur(0);
    }
    .page-title {
        padding: 4vw;
        margin-top: 14vw;
        font-size: inherit;
        transition: opacity 300ms, filter 300ms;
        font-size: 7vw;
        line-height: 0.825em;
        letter-spacing: -0.015em;
        opacity: 1;
    }
    .page-title.hide {
        opacity: 0;
    }
    .page-title h2 {
        font-size: inherit;
        font-weight: inherit;
    }
    .page-works .page-title {
        font-size: 0;
    }
    .essays-menu li:first-child {
        margin-left: 4vw;
    }
    .essays-menu li {
        width: 22vw;
    }
    .essays-menu li:last-child {
        width: 96vw;
    }
    .essay, .about-wrapper {
        padding-bottom: 14vw;
    }

}

/* tablet portrait */
@media (max-width: 1024px) and (pointer: coarse) {
    :root {
        --font-size: 2.3vw;
        --line-height: 1.2em;
    }
}

/* mobile */
@media (max-width: 800px) {
    :root {
        --font-size: 4.6vw;
        --line-height: 1.2em;
    }
    .content p {
        margin: 1.2em 0;
    }
    nav {
        font-size: 13vw;
        opacity: 1;
        width: 100%;
        pointer-events: none;
    }
    nav h1,
    .thumbnail-icon {
        padding: 4vw;
    }
    nav ul {
        padding: 10vw 4vw 0vw 4vw;
        transition: opacity 300ms;
        pointer-events: all;
        width: 80vw;
    }
    nav ul.hide {
        opacity: 0;
        pointer-events: none;
    }
    nav ul.menu-pages {
        padding-top: 10vw;
    }
    nav ul li a {
        display: inline-block;
        height: auto;
    }
    .logo,
    .thumbnail-icon {
        height: 20vw;
        pointer-events: all;
    }
    .thumbnail-icon {
        height: 16vw;
    }
    .logo.show,
    .thumbnail-icon.show {
        opacity: 1;
    }
    .years-menu ul {
        text-align: right;
        padding: 3vw;
        transition: transform 300ms;
    }
    .years-menu li {
        transition: margin-bottom 300ms, margin-top 300ms, opacity 300ms;
        height: 14vw;
        opacity: 1;
        margin-top: 0;
    }
    .years-menu.open li {
        pointer-events: none;
    }
    .years-menu.open li.active {
        pointer-events: all;
        margin-top: calc(14vw * 0.2);
    }
    .years-menu li.active {
        margin-top: 0;
    }

    .years-menu li:first-child.active {
        margin-top: 0;
    }
    
    .content {
        padding: 4vw;
        /*font-size: 2.25em;*/
        line-height: 1.1em;
        transition: opacity 300ms, filter 300ms;
    }
    .essays-menu {
        transition: opacity 300ms, filter 300ms;
    }
    .content.blur, .page-title.blur, .essays-menu.blur {
        filter: blur(2vw);
        opacity: 0.4;
    }
    nav ul li {
        /*height: 12vw;*/
        /*transition: height 300ms;*/
    }
    nav ul.hide li {
        /*height: 0;*/
        pointer-events: none;
    }
    .news-wrapper li {
        width: 100%;
        padding-bottom: 14vw;
    }
    .news-wrapper a:hover img {
        filter: blur(0);
    }
    .page-title {
        padding: 4vw;
        margin-top: 12vw;
        /*font-size: 7em;*/
        transition: opacity 300ms, filter 300ms;
        font-size: 13vw;
        line-height: 0.825em;
        letter-spacing: -0.015em;
        opacity: 1;
    }
    .page-title.hide {
        opacity: 0;
    }
    .page-title h2 {
        font-size: inherit;
        font-weight: inherit;
    }
    .page-works .page-title {
        font-size: 0;
    }
    .years-menu li {
        height: 14vw;
    }
    .years-menu.open li.active {
        margin-top: 7vw;
    }
    .years-menu.open li:first-child.active {
        margin-top: 0;
    }
    .essays-menu li:first-child {
        margin-left: 4vw;
    }
    .essays-menu li {
        width: 42.5vw;
    }
    .essays-menu li:last-child {
        width: 96vw;
    }
    .essay, .about-wrapper {
        padding-bottom: 14vw;
    }

    .footnotes-list {
        margin-left: 0;
    }

}



