@font-face {
    font-family: "Milling Triplex";
    src: url("./assets/fonts/MillingTriplexVAR.woff2") format("woff2");
    font-weight: 100 500;
    font-style: normal;
    font-display: swap;
}

html {
    font-size: 16px;

    --deck-color-background: #000;
    --deck-color-foreground: #fff;
    --deck-color-overlay: #000;

    --deck-font-family: "Milling Triplex", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --deck-font-weight-default: 250;
    --deck-font-weight-light: 125;
    --deck-font-weight-animation-min: 100;
    --deck-font-weight-animation-max: 500;

    --deck-font-size-12: 12rem;
    --deck-font-size-8: 8rem;
    --deck-font-size-4: 4rem;
    --deck-font-size-2: 2rem;

    --deck-line-height-tight: 1;
    --deck-line-height-regular: 1.15;
    --deck-note-font-size: 1rem;
    --deck-note-line-height: 1.35;
    --deck-note-paragraph-margin-top: 0.5rem;

    --deck-slide-padding-y: 40px;
    --deck-slide-padding-x: 60px;
    --deck-media-padding-y: 20px;
    --deck-grid-gap: 10px;
    --deck-running-title-center-y: calc((var(--deck-media-padding-y) - var(--deck-slide-padding-y)) / 2);

    --deck-background-blur: 0.25rem;
    --deck-background-scale: 1.06;

    --deck-animation-title-duration: 10s;
    --deck-animation-intertitle-duration: 5s;
    --deck-intertitle-title-max-width: 15ch;

    --deck-progress-height: 0.125rem;
}

.reveal {
    background: var(--deck-color-background);
    color: var(--deck-color-foreground);
    font-family: var(--deck-font-family);
    font-weight: var(--deck-font-weight-default);
}

.reveal .slides {
    text-align: center;
}

.reveal .slides section {
    background: transparent;
    color: var(--deck-color-foreground);
    height: 100%;
    width: 100%;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: var(--deck-slide-padding-y) var(--deck-slide-padding-x);
}

.reveal .backgrounds {
    filter: grayscale(1) blur(var(--deck-background-blur));
    transform: scale(var(--deck-background-scale));
}

.reveal h3,
.reveal p,
.reveal figcaption {
    color: var(--deck-color-foreground);
    font-family: var(--deck-font-family);
    font-style: normal;
    text-transform: none;
    text-shadow: none;
    letter-spacing: 0;
}

.reveal aside.notes p {
    margin: var(--deck-note-paragraph-margin-top) 0 0;
    font-size: var(--deck-note-font-size);
    line-height: var(--deck-note-line-height);
}

.reveal em {
    font-style: italic;
}

.intertitle-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.reveal p.intertitle-slide__section-label {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    font-size: var(--deck-font-size-4);
    font-weight: var(--deck-font-weight-light);
    line-height: var(--deck-line-height-regular);
    text-align: left;
}

.reveal h2.intertitle-slide__title {
    position: absolute;
    left: 0;
    bottom: 0;
    max-width: var(--deck-intertitle-title-max-width);
    margin: 0;
    display: grid;
    align-content: start;
    font-size: var(--deck-font-size-12);
    line-height: var(--deck-line-height-tight);
    text-align: left;
}

.intertitle-slide__line {
    display: block;
    font-weight: var(--deck-font-weight-animation-max);
    font-variation-settings: "wght" var(--deck-font-weight-animation-max);
    font-synthesis: none;
    animation: none;
}

.reveal .slides section.present .intertitle-slide__line {
    animation: intertitle-animation var(--deck-animation-intertitle-duration) ease-out forwards;
    animation-delay: var(--line-delay, 0s);
}

.opening {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: var(--deck-grid-gap);
    width: 100%;
    height: 100%;
}

.opening__meta {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: start;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--deck-grid-gap);
}

.reveal p.opening__meta-item {
    margin: 0;
    font-size: var(--deck-font-size-2);
    font-weight: var(--deck-font-weight-light);
    line-height: var(--deck-line-height-regular);
}

.opening__meta-item--author {
    grid-column: 1 / 4;
    text-align: left;
}

.opening__meta-item--event {
    grid-column: 6 / 11;
    text-align: left;
}

.reveal p.opening__meta-item--date {
    grid-column: 11 / 13;
    justify-self: stretch;
    width: 100%;
    text-align: right;
}

.opening__title {
    grid-column: 1 / 10;
    grid-row: 2 / 5;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    font-size: var(--deck-font-size-8);
    line-height: var(--deck-line-height-tight);
    text-align: left;
}

.opening__block {
    grid-column: 1 / -1;
    align-self: start;
    display: grid;
    align-content: start;
}

.opening__block--1 {
    grid-row: 1 / 3;
}

.opening__block--2 {
    grid-row: 3;
}

.opening__segment {
    font-weight: var(--deck-font-weight-animation-max);
    font-variation-settings: "wght" var(--deck-font-weight-animation-max);
    font-synthesis: none;
    animation: title-animation var(--deck-animation-title-duration) ease-in-out infinite;
    animation-delay: var(--title-delay, 0s);
}

.reveal .slides section figure {
    margin: 0;
    width: 100%;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}

.reveal .slides section .slide-media {
    width: 100%;
    height: 100%;
    padding: var(--deck-media-padding-y) 0;
    box-sizing: border-box;
}

.reveal .slides section img,
.reveal .slides section video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    background: transparent;
}

.reveal .slides section video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.reveal .slides section .slide-running-title {
    position: absolute;
    top: var(--deck-running-title-center-y);
    left: 0;
    right: 0;
    transform: translateY(-50%);
    margin: 0;
    font-size: var(--deck-font-size-2);
    font-weight: var(--deck-font-weight-default);
    line-height: var(--deck-line-height-regular);
    letter-spacing: 0;
    text-transform: none;
    color: var(--deck-color-overlay);
    text-align: center;
    pointer-events: none;
}

.reveal .slides section figcaption {
    position: absolute;
    left: 0;
    bottom: 0;
    margin: 0;
    font-size: var(--deck-font-size-4);
    font-weight: var(--deck-font-weight-default);
    line-height: var(--deck-line-height-regular);
    letter-spacing: 0;
    text-transform: none;
    color: var(--deck-color-overlay);
    text-align: left;
    pointer-events: none;
}

@keyframes title-animation {
    0% {
        font-weight: var(--deck-font-weight-animation-max);
        font-variation-settings: "wght" var(--deck-font-weight-animation-max);
    }

    50% {
        font-weight: var(--deck-font-weight-animation-min);
        font-variation-settings: "wght" var(--deck-font-weight-animation-min);
    }

    100% {
        font-weight: var(--deck-font-weight-animation-max);
        font-variation-settings: "wght" var(--deck-font-weight-animation-max);
    }
}

@keyframes intertitle-animation {
    0% {
        font-weight: var(--deck-font-weight-animation-max);
        font-variation-settings: "wght" var(--deck-font-weight-animation-max);
    }

    100% {
        font-weight: var(--deck-font-weight-light);
        font-variation-settings: "wght" var(--deck-font-weight-light);
    }
}

.reveal .progress {
    height: var(--deck-progress-height);
}

.reveal .progress span {
    height: 100%;
}
