:root {
    --flexoki-black: #100f0f;
    --flexoki-paper: #fffcf0;

    --flexoki-950: #1c1b1a;
    --flexoki-900: #282726;
    --flexoki-850: #343331;
    --flexoki-800: #403e3c;
    --flexoki-700: #575653;
    --flexoki-600: #6f6e69;
    --flexoki-500: #878580;
    --flexoki-300: #b7b5ac;
    --flexoki-200: #cecdc3;
    --flexoki-150: #dad8ce;
    --flexoki-100: #e6e4d9;
    --flexoki-50: #f2f0e5;

    --flexoki-red-600: #af3029;
    --flexoki-red-400: #d14d41;

    --flexoki-orange-600: #bc5215;
    --flexoki-orange-400: #da702c;

    --flexoki-yellow-900: #4d3a0b;
    --flexoki-yellow-600: #ad8301;
    --flexoki-yellow-400: #d0a215;
    --flexoki-yellow-100: #fceeb8;

    --flexoki-green-600: #66800b;
    --flexoki-green-400: #879a39;

    --flexoki-cyan-950: #142625;
    --flexoki-cyan-600: #24837b;
    --flexoki-cyan-400: #3aa99f;
    --flexoki-cyan-50: #ebf2e7;

    --flexoki-blue-600: #205ea6;
    --flexoki-blue-400: #4385be;

    --flexoki-purple-600: #5e409d;
    --flexoki-purple-400: #8b7ec8;

    --flexoki-magenta-600: #a02f6f;
    --flexoki-magenta-400: #ce5d97;
}

:root {
    --smaller-screen-width: 769px;
    --border-gradient: linear-gradient(
        90deg,
        var(--flexoki-blue-400),
        var(--flexoki-blue-400) 20%,
        var(--flexoki-purple-400) 20%,
        var(--flexoki-purple-400) 40%,
        var(--flexoki-red-400) 40%,
        var(--flexoki-red-400) 50%,
        var(--flexoki-orange-400) 50%,
        var(--flexoki-orange-400) 60%,
        var(--flexoki-yellow-400) 60%,
        var(--flexoki-yellow-400) 70%,
        var(--flexoki-green-400) 70%,
        var(--flexoki-green-400) 80%,
        var(--flexoki-cyan-600) 80%,
        var(--flexoki-cyan-600)
    );
    --base-font-size: 14.8px;
    --font-content:
        Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
    /* --font-content: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif; */
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-content);
    /* font-family: Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif; */
    /* font-size: var(--base-font-size); */
    margin: 0;
    font-weight: 400;
    color: var(--flexoki-black);
    background: var(--flexoki-paper);
    transform: translate3d(0, 0, 0);
    transition: transform 1567ms;
    transition-timing-function: ease-in-out;
    /* -webkit-font-smoothing: antialiased; */
}

a {
    color: var(--flexoki-800);
    text-decoration: underline;
    text-decoration-color: var(--flexoki-black);
}

header a {
    text-decoration-color: var(--flexoki-150);
}

a:hover {
    color: var(--flexoki-cyan-600);
    text-decoration: none;
    -webkit-text-fill-color: var(--flexoki-cyan-600);
}

hr {
    border: 0;
    border-bottom: 1px var(--flexoki-150) solid;
}

sup {
    line-height: 0;
}

/* footnotes */
article hr + ol:last-of-type {
    font-size: 0.75em;
    line-height: 1.8;
    padding: 2em;
}

.primary-header {
    background: var(--flexoki-cyan-950);
    /* background: var(--flexoki-paper); */
    min-height: 68px;
    /* font-weight:100; */
}

@keyframes color-cycle {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

.primary-header:before,
.primary-header:after {
    content: "";
    display: block;
    height: 8px;
    /* background: var(--flexoki-yellow-400); */
    background: var(--border-gradient);
    /* box-shadow: 0 1px 0 var(--flexoki-950); */
}

.primary-header:before {
    transform: rotate(180deg);
}

.primary-header a {
    color: var(--flexoki-100);
    display: inline-block;
    padding: 1em;
    text-decoration: none;
}

.primary-header a[href^="http"]:after {
    content: "↗";
    vertical-align: super;
    display: inline-block;
    font-size: x-small;
    padding: 0 0 0 0.1rem;
    color: var(--flexoki-cyan-400);
    font-weight: bold;
}

.primary-header li:first-of-type a {
    color: var(--flexoki-50);
    font-weight: 500;
    padding: 1rem 2rem 1rem 1rem;
}

.primary-header a:hover {
    color: var(--flexoki-cyan-400);
    -webkit-text-fill-color: var(--flexoki-cyan-400);
    text-decoration: underline;
    text-decoration-color: var(--flexoki-cyan-600);
}

.primary-header .random-post-link {
    color: var(--flexoki-300);
    font-family: monospace;
}

.primary-header nav {
    /* max-width:1280px;
  margin:0 auto; */
    padding: 0 2em;
    height: 3.5em;
    overflow: scroll;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    font-size: 1rem;
}

nav::-webkit-scrollbar {
    display: none;
}

code {
    font-family:
        SFMono-Regular,
        Consolas,
        Liberation Mono,
        Menlo,
        Courier,
        monospace;
    white-space: pre-wrap;
}

pre {
    max-width: 100vw;
    overflow: scroll;
    -webkit-overflow-scrolling: touch;
}

@media screen and (min-width: 769px) {
    .primary-header nav {
        height: auto;
        overflow: hidden;
    }
}

.primary-header ul {
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

@media screen and (min-width: 769px) {
    .primary-header ul {
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.primary-header ul li {
    list-style: none;
    margin: 0;
    display: inline-block;
    /* flex:1;     */
}

.primary-header ul li:first-of-type {
    /* flex:1.5; */
    font-size: 1.25em;
}

.primary-header ul li:last-of-type {
    margin-left: auto;
}

main {
    min-height: calc(100vh - 68px - 340px);
}

/**
  Posts
*/

article img {
    max-width: 100%;
    height: auto;
}

article header {
    text-align: center;
    color: var(--flexoki-800);
    font-size: 1.6em;
    padding: 1rem;
    margin: 0 auto;
}

article section {
    font-size: var(--base-font-size);
    line-height: 1.6em;
    padding: 0 1rem;
    overflow-wrap: break-word;
}

article section h2,
article section h3 {
    /* margin-top: 4rem; */
    margin-bottom: 0;
}

h1,
h2,
h3,
h4 {
    font-weight: 500;
    line-height: 1.3;
}

h1 {
    font-size: calc(1.25rem + 1vw);
}
h2 {
    font-size: calc(1.1rem + 0.2vw);
}

h3 {
    font-size: calc(1.05rem + 0.2vw);
}

h4 {
    font-size: calc(1rem + 0.2vw);
}

article section blockquote {
    font-size: 1.2em;
    line-height: 1.6em;
    font-style: italic;
    color: var(--flexoki-500);
}

article section blockquote:before {
    content: "“";
    position: absolute;
    color: var(--flexoki-200);
    margin-left: -1em;
    font-size: 2em;
}

article section h1 {
  margin-bottom: 0;;
}

article ul {
    /* list-style:"– "; */
    padding-left: 2em;
}

article ul li {
    margin-bottom: 1rem;
}

header .post-title {
    line-height: 1.2em;
    margin-top: 4rem;
    margin-bottom: 0;
    /* background:var(--border-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: rgba(26,67,65,.75); */
}

.homepage-grid article header .datetime {
    font-size: 1rem;
}

@media screen and (min-width: 980px) {
    article header {
        padding: 2rem 2rem 0;
        grid-column: full;
        /* max-width: 1280px; */
    }

    article {
        /* max-width: 1920px; */
        margin: 0 auto;
        display: grid;
        padding: 0;
        grid-template-columns:
            [full-start] minmax(1em, 1fr)
            [main-start] minmax(0, 46em) [main-end]
            minmax(1em, 1fr) [full-end];
        grid-gap: 0 1em;
    }

    .homepage-grid article {
        grid-template-columns:
            [full-start] minmax(1em, 1em)
            [main-start] minmax(0, 1fr) [main-end]
            minmax(1em, 20rem) [full-end];
        min-height: calc(100vh - 68px - 340px);
    }

    .homepage-grid article header {
        grid-column: main-start;
        text-align: left;
        padding: 0;
        max-width: none;
    }

    .homepage-grid article header h2 {
        text-align: left;
    }

    .homepage-grid article section {
        grid-column: main-start;
    }

    .homepage-sidebar {
        clip-path: polygon(5rem 0, 100% 0, 100% 100%, 0 100%);
    }

    .homepage-sidebar-widget {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        padding-left: 5.5rem;
    }
}

.homepage-sidebar {
    background: var(--flexoki-950);
}

.homepage-sidebar-widget {
    background: var(--flexoki-black);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--flexoki-150);
    /* font-weight: 200; */
}

.homepage-sidebar-widget.upcoming-events h4 {
    background-image: linear-gradient(
        to bottom left,
        var(--flexoki-purple-400),
        var(--flexoki-magenta-400)
    );
    background-clip: text;
    text-fill-color: rgba(0, 0, 0, 0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: rgba(0, 0, 0, 0);
}

.homepage-sidebar-widget:nth-of-type(odd) {
    background: var(--flexoki-950);
}

.homepage-sidebar-widget-container {
    padding: 3rem 2rem 2rem;
    font-size: 1rem;
    flex-basis: 100%;
}

.homepage-sidebar-widget-header {
    padding: 0;
    margin: 0;
    color: var(--flexoki-50);
}

.homepage-sidebar-widget-date {
    color: var(--flexoki-300);
}

.homepage-sidebar-widget a {
    color: var(--flexoki-50);
    text-decoration: underline;
    text-decoration-color: var(--flexoki-cyan-600);
}

.homepage-sidebar-widget a:hover {
    text-decoration: none;
    color: var(--flexoki-cyan-400);
}

.primary-footer:before {
    content: "";
    display: block;
    height: 8px;
    /* background: var(--flexoki-magenta-400); */
    background: var(--border-gradient);
    margin: 0;
}

.primary-footer {
    margin: 0 auto;
    font-size: 17px;
    color: var(--flexoki-300);
    line-height: 1.6em;
    background: var(--flexoki-cyan-950);
    padding: 0 0 2em;
    min-height: 340px;
}

.primary-footer img {
    transition:
        transform 300ms,
        rotate 250ms;
}
.primary-footer img:hover {
    transform: scale(0.9) rotate(10deg);
}

.primary-footer a {
    color: var(--flexoki-150);
    text-decoration: underline;
    text-decoration-color: var(--flexoki-cyan-600);
}

.primary-footer a:hover {
    color: var(--flexoki-cyan-50);
    text-decoration: none;
}

.primary-footer .grid-container {
    padding: 1rem;
}

.primary-footer figure {
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.7;
    margin: 1em 0;
}

.primary-footer figure blockquote {
    margin: 0;
    padding: 0;
    display: inline-block;
}

@media (min-width: 700px) {
    .primary-footer .grid-container {
        display: grid;
        /* padding:1rem 0 0 0; */
        grid-template-columns: minmax(1em, 500px) minmax(1em, 580px);
        grid-template-areas: "a b";
        /* grid-template-columns: [full-start] minmax(1em, 1fr)
    [footer-column-start] minmax(100px, 500px) minmax(100px, 580px) [footer-column-end]
    minmax(1em, 1fr) [full-end]; */
        grid-gap: 1.5rem;
        margin: 0 auto;
        justify-content: center;
    }

    .primary-footer .grid-container section {
        grid-area: b;
    }

    .primary-footer .grid-container section:nth-of-type(2) {
        grid-area: a;
    }

    article section {
        grid-column: main-start;
        padding-bottom: 4em;
        max-width: 37em;
        margin: 0 auto;
    }

    article.full-page section {
        grid-column-start: full-start;
        grid-column-end: full-end;
    }
}

.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-align: center;
    color: var(--flexoki-200);
    border-right: 1px solid var(--flexoki-150);
    vertical-align: top;
    padding-right: 5px !important;
}

.hljs-ln-code {
    padding-left: 10px !important;
}

.conferences-container,
.project-list-container {
    grid-column-start: full-start;
    grid-column-end: full-end;
    margin: 0;
    padding: 0;
}

.conferences--past,
.project-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
}

.conferences-header--past {
    text-align: center;
}

.conferences--past .conference-detail,
.project-list .project-detail {
    width: 100%;
    padding: 1em 2em 2em 0;
    list-style: none;
    margin: 0;
    max-width: 50%;
}

.conferences--past .conference-detail figure img,
.project-list .project-detail figure img {
    display: block;
}

.conferences--past .conference-detail figure,
.project-list .project-detail figure {
    margin: 0;
}

@media screen and (min-width: 769px) {
    .conferences--past .conference-detail {
        width: 33%;
        max-width: 350px;
    }

    .project-list .project-detail {
        width: 33%;
        max-width: 575px;
    }
}

/**
  Project specific stuff
*/

.project-list .project-detail {
    font-size: 1em;
}

/**
  Sponsor page specific stuff

  **/

#sponsor_form fieldset {
    border: 0;
    padding: 0;
}

#sponsor_form label {
    font-weight: bold;
}

.sponsor_amount_container {
    display: flex;
    width: 10em;
    border: 1px #999 solid;
    padding: 0 0.5em;
    border-radius: 3px;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    margin: 0.5em 0;
}
#sponsor_form button {
    font-size: 1em;
    background: var(--flexoki-blue-400);
    padding: 0.5em 1em;
    color: var(--flexoki-100);
    border-radius: 3px;
}

#sponsor_form button:hover {
    cursor: pointer;
    color: var(--flexoki-150);
}

.sponsor_amount_container:focus-within {
    outline-style: auto;
    outline-color: -webkit-focus-ring-color;
}

.sponsor_amount_container span,
.sponsor_amount_container input {
    font-family: system-ui;
    margin: 0;
    padding: 0;
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
}

.sponsor_amount_container span {
    color: var(--flexoki-300);
}

.sponsor_amount_container input {
    font-size: 1em;
    flex: 10;
    max-width: calc(100% - 1em);
    background: none;
}

.sponsor_amount_container input:focus {
    outline: none;
}

.archive-list {
    list-style: none;
    padding: 0;
}

.archive-list li {
    margin-bottom: 1em;
    border-left: 4px var(--flexoki-100) solid;
    padding-left: 1rem;
}

.masthead-title {
    padding-left: 1rem;
    margin-bottom: 0;
    width: 100vw;
    /* background-image: linear-gradient(from right to left, #f0f, #ff0); */
    /* background-image: linear-gradient(to right, rgb(243, 26, 124), rgb(248, 113, 43)); */
    /* background:
        linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)),
        var(--border-gradient); */
    background-color: rgba(0,0,0, 0.35);
    background-size: 100%;
    /* background-clip: text; */
    /* text-fill-color: rgba(0, 0, 0, 0); */
    /* -webkit-background-clip: text; */
    /* -webkit-text-fill-color: rgba(0, 0, 0, 0); */
    /* font-size:2.5em; */
    /* width: auto; */
    
    padding:0;
    /* filter: invert(1); */
}

.mastehad-title span {
    display: inline-block;
    /* max-width:1280px;
  margin:0 auto; */
}

@media screen and (min-width: 769px) {
    .masthead-title {
        position: absolute;
        color: var(--flexoki-100);
        bottom: 0;
        font-size: 4em;
        margin-bottom: 0;
        padding-bottom: 0.5rem;
        padding-left: 3rem;        
    }
}

.masthead-image {
    /* min-height: 350px;
    min-height: 600px; */
    position: relative;
    grid-column: full;
    background-size: 100% auto;
    height: 60vh;
    height: auto;
    max-height: 600px;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.masthead-image img {
    min-width: 100%;
}

.upcoming-talk-widget {
    /* border:1px #000 solid; */
    margin:1rem 0;
    padding:0.5rem 1rem;
    /* border-radius:1rem;
    width:auto;
    display: inline-block;
    background: var(--flexoki-yellow-100);             */
}

.upcoming-talk-widget-header {
    margin:0;
    
} 


.digital-ephemera-prelude {
    background: var(--flexoki-100);
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.muted {
    color: var(--flexoki-500);
}

@media (prefers-color-scheme: dark) {
    body {
        background: var(--flexoki-950);
        color: var(--flexoki-100);
    }
    a {
        color: var(--flexoki-paper);
        text-decoration-color: var(--flexoki-paper);
    }

    .homepage-sidebar {
        background: var(--flexoki-900);
    }
    .homepage-sidebar-widget:nth-of-type(odd) {
        background: var(--flexoki-900);
    }
}
