:root {
    --mobile-font-size: 16px;
    --desktop-font-size: 20px;
}

html {
    font-size: var(--desktop-font-size);
}

body {
    font-family: "Helvetica Neue", sans-serif;
    font-family: 'PT Sans', 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; 
    margin: 1rem;
    padding: 0;
    color: #000000;
    background-color: #f3f1ec;
}

.ctrl {
    display: none;
}

header,
main,
footer {
    max-width: 900px;
    margin: auto;
}

.header-meta {
    display: flex;
    align-items: baseline;
    justify-content: center;
    container-type: inline-size;
}

.header-meta > h1 {
    font-size: 5.5cqi;
    white-space: nowrap;
    color: #fb0290;
}

.header-img {
    border-radius: 50px 0 50px 0;
}

nav a {
    padding: 0.5rem 0;
}

nav.top a {
    text-decoration: none;
}
nav {
    display: flex;
    justify-content: space-around;
}

nav.projects a.projects,
nav.blog a.blog,
nav.about a.about,
nav.now a.now,
nav.links a.links,
nav.democlub a.democlub {
    font-weight: bold;
    border-bottom: 1px solid #000;
}

nav.top a:hover {
    border-bottom: 1px solid #000;
}

.projects-section h2 {
    text-align: center;
}

.projects-section h2::before,
.projects-section h2::after {
    content: " ~ ";
}

.projects-section ul {
    line-height: 1.5rem;
    list-style-type: circle;
    margin-bottom: 3rem;
    padding-left: 1.5rem;
}

.content-category {
    display: grid;
    column-gap: 1em;
    align-items: stretch;
}

.content-category-comics {
    grid-template-columns: repeat(3, 1fr);
}

.content-category-music {
    grid-template-columns: repeat(3, 1fr);
}

.content-category-video {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 30px;
    align-items: stretch;
}

.tile {
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-tile {
    position: relative;
}

.tile:hover,
.video-tile:hover {
    filter:brightness(1.3);
}

.tile p {
    line-height: 1.5rem;
    margin: 0 0 24px 0;
}
.tile h3 {
    margin-bottom: 0.5rem;
}

.tile a,
.video-tile a {
    color: #000;
    text-decoration: none;
    width: 100%;
}

.tile a:hover,
.video-tile a:hover {
    text-decoration: underline;
}

.image-placeholder {
    width: auto;
}

.image-placeholder img,
.video-slate-placeholder img {
    width:100%;
    max-height: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
}

hr {
    width: 50%;
    border: 1px solid #ccc;
}

/* music pages */

body.music {
    background-color: #252525;
    color: #fff;
}

.music-link-section {
    text-align: center;
    max-width: 500px;
    margin: auto;
}

.music-link-section > * {
    flex-grow: 1;
}

.music-link-header {
    font-size: 2rem;
}

.music-link-image {
    width: 100%;
}

.music-link-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

a.music-link {
    display: block;
    font-size: 1.6rem;
    padding: 20px;
    background: royalblue;
    color: white;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    margin-bottom:20px;
}

footer {
    border-top: 1px solid #000000;
    padding: 2rem 0;
}

/* blog styles */

.post {
    line-height: 1.6rem;
    margin-bottom:3rem;
}

.post img {
    max-width: 100%;
}

.post blockquote {
    border-left: 2px solid #ccc;
    padding-left: 1rem;
}

.post .video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

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

.unfurl {
  max-inline-size: 50ch;
  border: 1px solid black;
  border-radius: 20px;
  margin: 1em 0;
  overflow: hidden;
  background-color: #fff;
}

.unfurl_details > * {
    margin: 0;
}

.unfurl_details {
    padding: 1em;
}

.unfurl img {
  object-fit: contain;
  inline-size: 100%;
  block-size: 100%;
}

[class*="line-clamp-"] {
    display: -webkit-box;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.line-clamp-3 {
    line-clamp: 3;
    -webkit-line-clamp: 3;
}

.line-clamp-2 {
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

code {
    color: #a11c80;
    font-size: 0.9em;
    font-weight: bold;
}
pre {
    background: #0d0b2e;
    padding: 1em;
    border-radius: 1em;
    white-space: pre-wrap;
}
pre > code {
    color: lime;
}

aside {
    font-style: italic;
}

figure {
    & > img {
        border: 1px solid #000;
    }

    & figcaption {
        font-size: 0.8em;
        text-align: center;
        opacity: 0.5;
    }
}

abbr[title] {
    cursor: help;
    text-decoration: underline;
}

.sixtyfour-header {
    font-family: "Sixtyfour", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
      "BLED" 0,
      "SCAN" 0;
}

#links-page {
    column-count: 3;

    & section {
        break-inside: avoid;
        padding: 1rem 0;
    }
}

iframe.video-square {
    width:600px;
    height:600px;
}

.footnote-ref a {
    font-size: 1em;
    text-decoration: none;
}


@media only screen and (max-device-width: 480px) and (orientation: portrait) {

    html {
        font-size: var(--mobile-font-size);
    }

    h1 {
        font-size: 1.2em;
    }

    h2 {
        font-size: 1em;
    }

    .content-category {
        grid-template-columns: repeat(2, 1fr);
    }
    .content-category-video {
        grid-template-columns: repeat(1, 1fr);
    }
    .description {
        display: none;
    }

    .unfurl {
        max-inline-size: 100%;
    }

    #links-page {
        column-count: 1;

        & section {
            padding: 0;
        }
    }

    iframe.video-square {
        width: 900px;
        height: 900px;
    }
}

/* image gallery styles */

.neat-gallery {
    list-style: none;
    margin: auto;
    padding: 0;
}

.neat-gallery-layout-masonry {
    display: block;
    column-fill: balance;
    columns: 5 auto;
    max-inline-size: 90vw;

    & .neat-gallery-img {
        inline-size: 100%;
    }
}
@media only screen and (max-device-width: 520px) {
    .neat-gallery-layout-masonry {
        column-count: 3;
    }
}

.neat-gallery-layout-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(15ch, 100%), 1fr)
    );

    & .neat-gallery-img {
        aspect-ratio: 1;
        object-fit: cover;
        inline-size: 100%;
        block-size: 100%;
    }
}
