/* Garden */

/*

// START -- THEME INFO //

<p>Add a <code>css_class:</code> variable to a block's description to control how it appears in the grid.</p>

<table>
  <thead>
    <tr><th>Variable</th><th>What does it do</th></tr>
  </thead>
  <tbody>
    <tr><td><code>css_class: wide</code></td><td>Spans 2 columns</td></tr>
    <tr><td><code>css_class: full</code></td><td>Spans the full row</td></tr>
  </tbody>
</table>

// END -- THEME INFO //

*/

:root {
    /* START -- EDITABLE IN PANEL */
    --color-text: #000;
    --color-link: #000;
    --color-muted: #999;
    --color-background: #fff;
    /* END -- EDITABLE IN PANEL */
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    padding: 4rem;
    max-width: none;
    margin: 0;
    color: var(--color-text);
    background: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    margin: 0;
}

a:hover {
    color: var(--color-link);
}

/* Header */

.site-header {
    margin-bottom: 6rem;
}

.site-title {
    font-size: 1rem;
    font-weight: normal;
}

.site-title a {
    text-decoration: none;
}

.site-title a:hover {
    text-decoration: underline;
}

.site-description {
    margin-top: 0.5rem;
    color: var(--color-muted);
    line-height: 1.5;
}

.site-description hr {
    margin: 1em 0;
    border: 0;
    border-top: 1px solid var(--color-muted);
}

.site-meta {
    margin-top: 0.5rem;
    color: var(--color-muted);
}

.site-collaborators a {
    color: var(--color-muted);
}

.site-collaborators a:hover {
    color: var(--color-text);
}

.site-meta-sep {
    color: var(--color-muted);
}

.site-rss {
    color: var(--color-muted);
}

.site-rss:hover {
    color: var(--color-text);
}

/* Grid */

.blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.block {
    margin: 0;
}

.block.wide {
    grid-column: span 2;
}

.block.full {
    grid-column: 1 / -1;
}

.block-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.block-detail-title {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 1.5rem;
}

/* Image */

.block-image img {
    width: 100%;
}

.block-image figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-muted);
}

/* Text */

.block-text {
    line-height: 1.6;
}

.block-text p {
    margin-bottom: 1em;
}

.block-text .block-content a {
    text-decoration: underline;
}

.block-text .block-title a {
    text-decoration: none;
}

.continue-reading {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--color-muted);
}

.continue-reading:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* Block detail — page layout */

.block-detail-back {
    position: fixed;
    top: 2rem;
    right: 2rem;
    font-size: 0.875rem;
    color: var(--color-muted);
    text-decoration: none;
}

.block-detail-back:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.block-detail {
    max-width: 720px;
    margin: 3rem auto;
    padding: 2rem 0;
}

.block-detail .block {
    margin: 0;
}

.block-detail .block-image img {
    aspect-ratio: auto;
    object-fit: contain;
}

.block-detail .block-text {
    border: none;
    padding: 0;
    min-height: auto;
    aspect-ratio: auto;
    font-size: 1.05rem;
    line-height: 1.7;
}

.block-text ul,
.block-text ol {
    padding-left: 1.8em;
    margin-bottom: 1em;
}

.block-text li {
    margin-bottom: 0.3em;
}

.block-detail .block-text blockquote {
    border-left: 2px solid var(--color-muted);
    padding-left: 1em;
    margin-bottom: 1em;
    color: var(--color-muted);
}

.block-detail .block-text pre {
    background: var(--color-background);
    padding: 12px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.block-detail .block-text code {
    background: var(--color-background);
    padding: 1px 4px;
}

.block-detail .block-text pre code {
    background: none;
    padding: 0;
}

.block-detail .block-text hr {
    border: 0;
    border-top: 1px solid var(--color-muted);
    margin: 1em 0;
}

.block-detail .block-description {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-top: 1rem;
}

/* Link */

.block-link .block-content > a {
    display: block;
    text-decoration: none;
    border: 1px solid var(--color-muted);
    border-radius: 4px;
    padding: 1rem;
    min-height: 200px;
}

.block-link .block-content > a:hover {
    border-color: var(--color-text);
}

.block-link .link-preview {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.block-link .link-title {
    display: block;
}

.block-link .link-url {
    display: none;
}

.block-link .link-provider {
    display: block;
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

/* Embed */

.block-embed .embed-container {
    position: relative;
}

.block-embed .embed-title,
.block-attachment .embed-title {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.block-embed .embed-container iframe {
      aspect-ratio: 4/3;
}

/* Attachment */

.block-attachment {
    border: 1px solid var(--color-muted);
    border-radius: 4px;
    padding: 1rem;
}

.block-attachment:has(video) {
    border: none;
    border-radius: 0;
    padding: 0;
}

.block-attachment .attachment-preview {
    margin-bottom: 0.75rem;
}

/* Channel */

.block-channel .block-content > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--color-muted);
    aspect-ratio: 1 / 1;
    padding: 1.5rem;
    position: relative;
}

.block-channel .block-content > a:hover {
    border-color: var(--color-text);
}

.block-channel .channel-preview {
    max-width: 70%;
    max-height: 60%;
    object-fit: contain;
}

.block-channel .channel-title {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-weight: 500;
}

/* Block meta */

.block-meta {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.block-description {
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.block-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.block-date {
    color: var(--color-muted);
}

.block-contributor a {
    color: var(--color-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.block-contributor a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.contributor-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.block-permalink {
    color: var(--color-muted);
    text-decoration: none;
}

.block-permalink:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* Pagination */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 3rem 0 1rem;
}

.pagination a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-muted);
    border-radius: 4px;
}

.pagination a:hover {
    border-color: var(--color-text);
}

.page-info {
    font-size: 0.875rem;
    color: var(--color-muted);
}

@media (max-width: 640px) {
    body {
        padding: 1.5rem;
    }
}
