body {
    font-family: "Courier New", "IBM Plex Mono", "SF Mono", Menlo, Monaco, "DejaVu Sans Mono", monospace;
    background: #fff;
    color: #000;
}

.site-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    border-bottom: 4px solid #000;
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

nav {
    font-size: 1rem;
    font-weight: 700;
}

nav a {
    color: #000;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

nav a:hover {
    background: #000;
    color: #fff;
}

main.content {
    margin-bottom: 4rem;
}

main.content h1 {
    font-size: 3rem;
    font-weight: 900;
    border-bottom: 4px solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

main.content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

main.content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
}

main.content p {
    margin-bottom: 1.5rem;
}

main.content a {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}

main.content a:hover {
    background: #000;
    color: #fff;
}

main.content ul, main.content ol {
    margin-bottom: 1.5rem;
}

main.content li {
    margin-bottom: 0.5rem;
}

main.content blockquote {
    border-left: 4px solid #000;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    font-style: italic;
}

main.content blockquote p:last-child {
    margin-bottom: 0;
}

main.content code {
    background: #000;
    color: #fff;
    padding: 0.1em 0.3em;
    font-size: 0.9em;
}

main.content pre {
    background: #000;
    color: #fff;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

main.content pre code {
    background: none;
    padding: 0;
}

main.content hr {
    border: none;
    border-top: 4px solid #000;
    margin: 3rem 0;
}

main.content img,
main.content video,
main.content audio {
    border: 3px solid #000;
    margin-bottom: 1.5rem;
}

/* Summary line clamp for blog listing */
.summary-clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--summary-lines, 3);
    overflow: hidden;
}

/* Media gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.gallery-item {
    border: 3px solid #000;
    overflow: hidden;
}

.gallery-item:target {
    grid-column: 1 / -1;
}

.gallery-thumb {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.gallery-thumb:hover {
    background: transparent;
}

main.content .media-gallery .gallery-thumb img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: none;
    margin: 0;
}

.gallery-item:target .gallery-thumb {
    display: none;
}

.gallery-full {
    display: none;
}

.gallery-item:target .gallery-full {
    display: block;
}

main.content .media-gallery .gallery-full img {
    display: block;
    width: 100%;
    border: none;
    margin: 0;
    padding: 0.5rem;
}

.gallery-full .caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: #000;
    color: #fff;
}

.gallery-close {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.gallery-close:hover {
    background: transparent;
    color: #ccc;
}

footer {
    border-top: 4px solid #000;
    padding-top: 1.5rem;
    font-size: 0.9rem;
}

footer a {
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .site-wrapper {
        padding: 1.5rem 1rem;
    }

    .site-title {
        font-size: 1.8rem;
    }

    main.content h1 {
        font-size: 2rem;
    }

    main.content h2 {
        font-size: 1.5rem;
    }

    nav {
        font-size: 0.9rem;
    }
}
