/* ── mp4k.net — Amiga Workbench Theme ────────────────────── */

/* ── Variables ──────────────────────────────────────────── */
:root {
    --bg:          #1a1a2e;
    --surface:     #16213e;
    --surface-alt: #1e2d50;
    --amber:       #ff9f43;
    --amber-dim:   #c8a060;
    --text:        #c8d0e0;
    --text-muted:  #7a8baa;
    --text-dim:    #5a6a8a;
    --border:      #2a3555;
    --code-bg:     #0a0f1e;
    --rainbow: linear-gradient(90deg,
        #ff0000, #ff8800, #ffff00, #00cc00, #0088ff, #0000cc, #8800cc);
}

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

/* ── Base ───────────────────────────────────────────────── */
body {
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
}

/* ── Layout container ───────────────────────────────────── */
.site-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Header / Logo ──────────────────────────────────────── */
.site-header {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 2px solid var(--border);
    text-align: center;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.header-boing {
    position: absolute;
    left: 4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 96px;
    height: 96px;
    display: block;
    filter:
        drop-shadow(0 14px 12px rgba(0, 0, 0, 0.75))
        drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
}

@media (max-width: 600px) {
    .header-boing {
        width: 56px;
        height: 56px;
        left: 0.75rem;
    }
}

.logo-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.logo-bar {
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: var(--rainbow);
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
}

.logo-bar-bottom {
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: var(--rainbow);
    opacity: 0.5;
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 2.8rem;
    letter-spacing: 0.12em;
    color: #e0e0e0;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(108, 99, 255, 0.3);
    line-height: 1.1;
}

.logo-text:hover {
    color: #ffffff;
}

.site-tagline {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.25em;
    margin-top: 0.6rem;
}

/* ── Index page ─────────────────────────────────────────── */
.post-list {
    margin-top: 0.5rem;
}

.post-list-title {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.0rem;
    color: var(--amber);
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
}

/* ── Post cards ─────────────────────────────────────────── */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    border-color: var(--amber);
    box-shadow: 0 0 15px rgba(255, 159, 67, 0.1);
}

.post-card h2 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.post-card h2 a {
    color: var(--amber);
    text-decoration: none;
}

.post-card h2 a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.6rem;
}

.post-meta .separator {
    margin: 0 0.4rem;
}

.post-meta .category {
    color: var(--text-muted);
}

.post-meta .reading-time {
    color: var(--text-dim);
    margin-left: 0.5rem;
}

.excerpt {
    color: #9aa8c0;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.post-tags-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* ── Post detail ────────────────────────────────────────── */
article.post header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

article.post header h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--amber);
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* ── Tags (post detail) ─────────────────────────────────── */
.tags {
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    background: var(--surface-alt);
    color: var(--text-muted);
    border: 1px solid var(--border);
    margin-right: 0.4rem;
    margin-bottom: 0.25rem;
}

/* ── Post content ───────────────────────────────────────── */
.post-content {
    margin-bottom: 2rem;
}

.post-content h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--amber);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
}

.post-content h2 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--amber);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
}

.post-content h3 {
    font-family: 'Orbitron', monospace;
    font-weight: 400;
    font-size: 1rem;
    color: var(--amber-dim);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-content h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
}

.post-content p {
    margin-bottom: 1rem;
    color: var(--text);
}

.post-content a {
    color: var(--amber);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #ffb870;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text);
}

.post-content li {
    margin-bottom: 0.3rem;
}

/* ── Code blocks ────────────────────────────────────────── */
.post-content pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.25rem 0;
    overflow-x: auto;
}

.post-content p code,
.post-content li code {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--amber);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

/* ── Blockquotes ────────────────────────────────────────── */
.post-content blockquote {
    border-left: 3px solid var(--amber);
    padding: 0.75rem 1rem;
    margin: 1.25rem 0;
    background: var(--surface);
    border-radius: 0 4px 4px 0;
    color: #9aa8c0;
    font-style: italic;
}

.post-content blockquote p {
    margin-bottom: 0;
    color: #9aa8c0;
}

/* ── Post footer ────────────────────────────────────────── */
.post-footer {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.post-footer a {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--amber);
    text-decoration: none;
}

.post-footer a:hover {
    text-decoration: underline;
}

/* ── Site footer ────────────────────────────────────────── */
.site-footer {
    max-width: 820px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2rem;
    border-top: 2px solid var(--border);
    text-align: center;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.site-footer .logo-bar {
    max-width: 200px;
    height: 3px;
    margin: 0 auto 0.75rem;
}

.site-footer p {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* ── No-posts state ─────────────────────────────────────── */
.no-posts {
    padding: 2rem 0;
}

.no-posts p {
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.no-posts-message {
    color: var(--text-muted);
}

/* ── Image positioning ──────────────────────────────────── */
.post-image {
    margin: 1.5rem 0;
}

.post-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-image--center {
    text-align: center;
}

.post-image--center img {
    margin: 0 auto;
    max-width: 80%;
}

.post-image--right {
    float: right;
    margin: 0 0 1.5rem 2rem;
    max-width: 45%;
}

.post-image--left {
    float: left;
    margin: 0 2rem 1.5rem 0;
    max-width: 45%;
}

.post-image--full {
    width: 100%;
    margin: 2rem 0;
}

.post-image--full img {
    width: 100%;
    max-width: 100%;
}

/* Clearfix for floated images */
.post-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Caption styling */
.post-image figcaption {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

/* Lightbox anchor — remove default link styling */
.post-image .lightbox-trigger {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ── Hero images ───────────────────────────────────────── */
.post-hero {
    margin: 1.5rem 0 2rem;
    border-radius: 6px;
    overflow: hidden;
}

.post-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.post-card-hero {
    margin: 0 0 0.75rem;
    border-radius: 4px;
    overflow: hidden;
}

.post-card-hero img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* ── GLightbox theme overrides ──────────────────────────── */
.glightbox-desc {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.glightbox-container .gslide-image img {
    border-radius: 2px;
}

.glightbox-container .gclose {
    top: 1rem;
    right: 1rem;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .logo-text {
        font-size: 2rem;
    }

    .site-header,
    .site-footer,
    .site-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .post-image--right,
    .post-image--left {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }

    article.post header h1 {
        font-size: 1.4rem;
    }
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.pagination-link {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--amber);
    text-decoration: none;
}

.pagination-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pagination-link.disabled {
    visibility: hidden;
}

.pagination-info {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
}
