/* Import Partials */
@import 'typography.css';
@import 'tables.css';
@import 'buttons.css';
@import 'navigation.css';
@import 'meta.css';

:root {    
    --color-primary: #d7d0c5;
    --color-highlighted: var(--color-accent);
    --color-muted: #8b948f;
    --color-black: #f3eee4;
    --color-background: #0b0d0f;
    --color-accent: #216c9a;
    --color-accent-secondary: #8c6dcb;
    --color-ink: #050608;
    --color-panel: #12161a;
    --color-panel-soft: #171b20;
    --color-rule: #283037;
    --color-shadow: rgba(0, 0, 0, .45);
}

/* CSS Reset */
html, body {
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: baseline;
    scrollbar-gutter: stable;
}

html {
    background-color: var(--color-background);
}

body {
    min-height: 100vh;
    background-color: var(--color-background);
}


/* Layout */
.site-container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    /* margin: 0 3em; */
}

/* Header */
header {
    /* height: 6.5rem; */
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-rule);
    background-color: var(--color-ink);
    box-shadow: 0 18px 45px var(--color-shadow);
}
.header-container {
    margin: 1.35em auto 1.15em;
}

/* Post Indexes */
.post-index {
    margin-top: 2.5rem;
}

i {
    padding-right: 10px;
}

.tag-index-header {
    margin-bottom: 1em;
}

.tag-index-header > h1 {
    margin-top: 0;
}

.index-mode-switch {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .45rem .75rem;
    font-family: var(--monospace-font);
    font-size: .9rem;
    color: var(--color-muted);
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
    padding: .75rem 0;
    margin-top: 1.25rem;
}

.index-mode-switch a,
.index-mode-current {
    display: inline-block;
}

.index-mode-switch a {
    color: var(--color-primary);
    font-weight: 400;
}

.index-mode-switch a:hover,
.index-mode-switch a:focus-visible {
    color: var(--color-accent);
}

.index-mode-label {
    color: var(--color-muted);
}

.index-mode-current {
    color: var(--color-black);
    font-weight: 600;
}

.index-item {
    margin-bottom: 2.75rem;
}
.index-item.slim {
    margin-bottom: 0;
}

.same-day-separator {
    width: 100%;
    height: 1px;
    background-color: var(--color-rule);
    opacity: .38;
    margin: -1.25rem 0 1.9rem;
}

.index-item .article-title {
    display: inline;
}

.index-item img {
    width: 100%;
}

.index-item .external-link {
    vertical-align: middle;
    padding: 0rem .5rem .5rem .65rem;
    font-size: .65rem;
}

/* Article & Page */
.article-content,
.page-content {
    padding-top: .25em;
}

.article-title {
    padding-top: .5em;
}

.article-content img {
    max-width: 100%;
    max-height: 350px;
    margin: 0 auto;
    display: block;
    object-fit: contain;
}

figure {
    margin: 0 0 1.5em;
}
/* figure figcaption {
    width: max-content;
    margin: 0 auto;
} */

img.featured-image {
    max-height: none;
}

footer {
    margin: 5rem 0 0;
    border-top: 1px solid var(--color-rule);
    padding: 1.5rem 0 2rem;
    background-color: var(--color-background);
}

footer i {
    padding: .1em;
}

.footer-content {
    margin: 0 auto;
    width: fit-content;
}

.article-footnote {
    color: var(--color-muted);
}

.article-footnote p:last-child {
    margin-bottom: 0;
}

::selection {
    color: var(--color-ink);
    background: var(--color-accent);
}

/* Embeds */
.eleventy-plugin-youtube-embed {
    margin: 1.5rem 0;
}

/* Center the audio player container */
.audio-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1em;
}

audio {
    max-width: 100%; /* Ensure it doesn't overflow */
}

.audio-container iframe {
    margin: 0 auto;
}

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

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

/* CSS to style the image grid */
.image-grid,
.media-grid {
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
    margin: 2rem 0;
}

.grid-row {
    display: flex;
    width: 100%;
    gap: 10px; /* Adjust the spacing between items */
}

.grid-item {
    flex: 1;
    min-width: 0; /* Allows flex items to shrink */
}

.grid-item img {
    width: 100%; /* Makes images responsive */
    height: auto;
    display: block;
}

.media-grid .eleventy-plugin-youtube-embed {
    margin: 0;
}

.media-grid p {
    display: none;
}

/* Mobile */
@media only screen and (max-width: 600px) {
    .site-container {
        width: min(90%, 38rem);
    }

    .article-content img {
        max-height: none;
    }
}
