/* ========================================
   BtwnClicks - Minimal B&W Webcomic Theme
   ======================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    background: #f5f0e8;
    line-height: 1.6;
}

a {
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: #555;
}

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

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    border-bottom: 2px solid #1a1a1a;
    padding: 1.25rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.site-title:hover {
    color: #1a1a1a;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.site-nav a.active {
    border-bottom: 2px solid #1a1a1a;
}

/* Main content */
.content {
    padding: 2rem 0;
    min-height: 60vh;
}

/* Comic display */
.comic-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.comic-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.comic-meta .comic-number {
    margin-left: 0.75rem;
    font-weight: 600;
}

.comic-image {
    margin: 0 auto 1.5rem;
}

.comic-image img {
    width: 100%;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.comic-alt-text {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.comic-commentary {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* Comic navigation */
.comic-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 1rem;
}

.comic-nav a,
.comic-nav span {
    font-size: 0.9rem;
    font-weight: 600;
}

.comic-nav .disabled {
    color: #ccc;
}

.comic-nav-archive {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* Archive grid */
.comic-archive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.archive-item {
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: border-color 0.15s;
}

.archive-item:hover {
    border-color: #1a1a1a;
}

.archive-item img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.archive-item-info {
    padding: 0.75rem;
}

.archive-item-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.archive-item-info time {
    font-size: 0.8rem;
    color: #666;
}

/* Blog */
.blog-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.blog-item h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.blog-item time {
    font-size: 0.85rem;
    color: #666;
}

.blog-item-summary {
    margin-top: 0.5rem;
    color: #444;
}

.blog-post time {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.blog-post-content p {
    margin-bottom: 1rem;
}

/* Generic page content */
.page-content ul,
.page-content ol {
    margin: 1rem 0;
    padding-left: 1.25rem;
}

.page-content p {
    margin-bottom: 1rem;
}

.page-content h2 {
    margin: 2rem 0 0.75rem;
}

.page-content h3 {
    margin: 1.5rem 0 0.5rem;
}

/* Footer */
.site-footer {
    border-top: 2px solid #1a1a1a;
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-social a {
    color: #666;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.footer-social a:hover {
    color: #1a1a1a;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    font-size: 0.85rem;
}

.pagination li.active span {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* Responsive */
@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        text-align: center;
    }

    .site-nav {
        gap: 1rem;
    }

    .comic-archive {
        grid-template-columns: 1fr;
    }

    .comic-title {
        font-size: 1.25rem;
    }
}
