/* =============================================================================
   Variables
   ============================================================================= */
:root {
    --bg:      #121212;
    --surface: #1e1e1e;
    --text:    #e0e0e0;
    --muted:   #aaa;
    --dim:     #666;
    --border:  #333;
    --link:    #8ab4f8;
    --link-hl: #c6d8ff;
    --mono:    ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* =============================================================================
   Reset / Base
   ============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 1000px;
    padding: 2rem 1.5rem;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--link-hl);
    text-decoration: none;
}

h2 {
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
}

pre, code {
    font-family: var(--mono);
}

/* =============================================================================
   Header / Nav
   ============================================================================= */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

#site-logo {
    max-width: clamp(200px, 50vw, 480px);
    height: auto;
    display: block;
    margin: 0 auto 1.5rem;
}

.ascii-art {
    font-family: var(--mono);
    font-size: clamp(0.45rem, 1.15vw, 0.85rem);
    white-space: pre;
    overflow-x: auto;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 1.5rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-family: var(--mono);
    font-size: 0.9rem;
}

.nav-links a {
    text-decoration: none;
}

.nav-links a.nav-active {
    color: #fff;
    cursor: default;
    pointer-events: none;
}

/* =============================================================================
   Landing
   ============================================================================= */
.landing {
    text-align: center;
    margin-top: 2rem;
}

.landing p {
    font-family: var(--mono);
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 0.5rem;
}

.landing p + p {
    font-size: 0.85rem;
}

/* =============================================================================
   Shared: bordered button / label
   ============================================================================= */
.btn {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--link);
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    cursor: pointer;
}

.btn:hover {
    border-color: var(--link);
    color: var(--link-hl);
    text-decoration: none;
}

.btn:disabled {
    color: var(--border);
    border-color: #222;
    cursor: default;
}

.label {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--dim);
    font-weight: 400;
    margin-left: 0.4rem;
}

/* =============================================================================
   Pictures
   ============================================================================= */
.photo-grid {
    columns: 280px 3;
    column-gap: 1.25rem;
    margin-top: 1.5rem;
}

.photo-item {
    display: block;
    break-inside: avoid;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.photo-item img {
    display: block;
    width: 100%;
    height: auto;
}

.photo-detail img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}

.caption {
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    padding: 0.5rem 0.6rem;
    text-align: right;
}

.photo-detail-nav {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0.6rem 0.25rem;
    font-size: 0.85rem;
}

.gallery-noscript img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
}

/* =============================================================================
   Issue List (zines.html)
   ============================================================================= */
.issue-entry {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    border: 1px solid var(--border);
    padding: 1rem;
    margin-top: 1.25rem;
}

.issue-thumb {
    flex-shrink: 0;
    width: 90px;
    display: block;
    border: 1px solid var(--border);
}

.issue-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.issue-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.issue-info h3 {
    margin: 0;
    font-weight: 500;
}

.issue-coming-soon {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

.issue-thumb-soon {
    flex-shrink: 0;
    width: 90px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    background: var(--surface);
}

.issue-thumb-placeholder {
    font-family: var(--mono);
    font-size: 2rem;
    color: var(--dim);
}

/* =============================================================================
   Issue Viewer (issue.html)
   ============================================================================= */
.issue-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.issue-meta h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.back-link {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--dim);
    text-decoration: none;
}

.back-link:hover {
    color: var(--link);
}

.gallery-img-wrap {
    border: 1px solid var(--border);
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-img-wrap img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
}

.gallery-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--muted);
}

/* =============================================================================
   Footer
   ============================================================================= */
footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--dim);
}

/* =============================================================================
   Mobile  (≤ 600px)
   ============================================================================= */
@media (max-width: 600px) {
    body {
        padding: 1.25rem 1rem;
    }

    h2 {
        margin-top: 2rem;
    }


    /* Stack issue entries vertically */
    .issue-entry {
        flex-direction: column;
    }

    .issue-thumb {
        width: 80px;
    }

    /* Issue viewer: stack title and download button */
    .issue-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Bigger tap targets for gallery buttons */
    .btn {
        padding: 0.6rem 1rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}
