:root {
    color-scheme: dark;
    --width-content: 45rem;
    --width-to-transition: calc(var(--width-content) + 2rem);
    --width-staff: 15rem;
    --width-to-transition-staff: calc(
        var(--width-content) + var(--width-staff) + 2rem
    );
    --line-height: 1.75;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #eee;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
        sans-serif;
    /* antialias */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1024px) {
    html,
    body {
        font-size: 1em;
    }
}

.it {
    font-style: italic;
}

footer {
    margin-top: 8rem;
    margin-bottom: 4rem;
    text-align: center;
    opacity: 0.7;
}

@media (max-width: 47rem) {
    footer {
        margin-top: 4rem;
        margin-bottom: 4rem;
    }
}

.subtitle {
    font-size: 0.8em;
    margin: 1em 0;
    opacity: 0.7;
}

.subtitle a {
    color: #fff;
    text-decoration: none;
}

main {
    padding: 1rem 0;
    max-width: var(--width-content);
    margin: 0 auto;
    margin-top: 4rem;
    line-height: 1.2;
}

/* var(--width-to-transition) */
@media (max-width: 47rem) {
    main {
        margin: 0 1rem;
    }
}

h1 {
    font-weight: 900;
    margin: 0;
}

h2 {
    margin-top: 4rem;
    font-weight: 900;
}

h3 {
    margin-top: 3rem;
    font-weight: 900;
}

p {
    line-height: var(--line-height);
}

#postProjectHeader {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #444;
}

#postProjectHeader a {
    text-decoration: none;
    color: inherit;
}

dl.staff {
    display: flex;
    flex-direction: column;
    margin: 1rem 0 0;
    padding: 0;
    opacity: 0.7;
    max-width: var(--width-staff);
}

dl.staff a {
    text-decoration: none;
    color: inherit;
}

dl.staff dt {
    margin: 0.5rem 0 0;
    padding: 0;
    opacity: 0.7;
    font-size: 0.8em;
}

dl.staff dt:first-child {
    margin-top: 0;
}

dl.staff dd {
    margin: 0 0 0.3rem;
    padding: 0;
}

.images {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.images img {
    width: 100%;
    margin: 0.5rem 0;
}

ul.links {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

ul.links a {
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
}

/* arrow after */
ul.links a::after {
    content: "→";
    margin-left: 0.5rem;
}

ul.links li {
    margin: 0 0 0.3rem;
    padding: 0;
}

ul.links li:first-child {
    margin: 0;
    font-size: 0.8em;
    opacity: 0.5;
}

ul.links a:hover {
    opacity: 1;
}

.projectItems {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 0 2rem;
    padding: 0;
}

.projectItems > * {
    flex: 1 1 30%;
    min-width: 12rem;
}

p a {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #fff;
}

.figureDescription {
    font-size: 0.8em;
    opacity: 0.7;
    text-align: center;
}

.imageGrid {
    margin-top: 4rem;
    margin-bottom: 1rem;
}

.imageGrid + .imageGrid {
    margin-top: 1rem;
}

.imageGrid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    max-height: 800px;
}

.imageGrid > img {
    display: block;
    width: 10px;
    max-height: 100%;
    flex: 1 1 auto;
    object-fit: contain;
    margin: 0;
}

dl.post {
    display: flex;
    flex-wrap: wrap;
    margin-top: 2em;
}

dl.post dt {
    width: 20%;
    margin-bottom: 1em;
    opacity: 0.7;
}

dl.post dd {
    margin-left: auto;
    width: 80%;
    margin-bottom: 1em;
    line-height: var(--line-height);
}

@media (max-width: 60rem) {
    dl.post {
        flex-direction: column;
    }

    dl.post dt,
    dl.post dd {
        width: 100%;
    }
}

.video-box {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.video {
    padding-top: 56.25%;
    position: relative;
}

.video.wide {
    padding-top: 42.25%;
}

.video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.white .video-box {
    margin-top: 0;
    margin-bottom: 0;
}

span.math {
    background: #222;
    padding: 0.1rem 0.3rem;
}

pre code {
    border-radius: 4px;
}

ul:not(.links),
ol {
    line-height: var(--line-height);
}

ol.resources {
    padding-top: 4em;
    margin-top: 4em;
    border-top: 0.1em solid #222;
    opacity: 0.7;
}

ol.resources a {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #fff;
}

.img-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;

    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.img-frame img {
    max-width: calc(100% - 1em);
    max-height: calc(100% - 4em);
    margin: 1em auto;
    display: block;
    background: #fff;
}

img.clickable {
    cursor: pointer;
}

.cite {
    font-size: 0.8em;
    border-left: 1px solid #fff;
    padding-left: 1em;
}
