/* ============================================================
   Nuff Vibes — main.css
   Accent: #1D9E75 (dark green)
   ============================================================ */

/* Variables */
:root {
    --accent:        #1D9E75;
    --accent-dark:   #167a5b;
    --accent-light:  #e6f6f1;
    --bg:            #ffffff;
    --bg-alt:        #f7f8f6;
    --text:          #1a1a1a;
    --text-muted:    #6b7280;
    --border:        #e5e7eb;
    --header-bg:     #111111;
    --header-text:   #f5f5f5;
    --footer-bg:     #111111;
    --footer-text:   #aaaaaa;
    --card-bg:       #ffffff;
    --radius:        8px;
    --radius-sm:     4px;
    --shadow:        0 2px 12px rgba(0, 0, 0, 0.07);
    --shadow-hover:  0 6px 24px rgba(0, 0, 0, 0.13);
    --font-sans:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-serif:    Georgia, 'Times New Roman', serif;
    --max-width:     1200px;
    --content-width: 720px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: url('../images/stripe-bg.svg') repeat-y;
    background-size: 8px auto;
    z-index: 9999;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

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

ul, ol { list-style: none; }

/* ── Utility ──────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.no-posts {
    text-align: center;
    color: var(--text-muted);
    padding: 64px 0;
    font-size: 1.1rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.btn--primary {
    background: var(--accent);
    color: #fff;
}
.btn--primary:hover {
    background: var(--accent-dark);
    color: #fff;
}

/* ── Site Header ──────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--header-text);
}
.site-logo:hover { color: var(--accent); }

.site-logo__text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: inherit;
}

/* light header variant */
.header-light .site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.header-light .site-logo { color: var(--text); }
.header-light .site-nav__link { color: var(--text-muted); }
.header-light .site-nav__link:hover { color: var(--accent); }
.header-light .site-nav__toggle span { background: var(--text); }

/* ── Site Nav ─────────────────────────────────────────────── */
.site-nav { display: flex; align-items: center; }

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav__item { display: flex; }

.site-nav__link {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
}
.site-nav__link:hover,
.site-nav__link--active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.site-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 8px;
}
.site-nav__toggle span {
    display: block;
    height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* ── Layout ───────────────────────────────────────────────── */
.site-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 48px;
    padding-bottom: 64px;
}

.has-sidebar .site-layout {
    grid-template-columns: 1fr 300px;
}

.content-area { min-width: 0; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--text-muted);
    line-height: 1.4;
}

/* Review type colours */
.badge--album-review        { background: #2563eb; }
.badge--concert-review      { background: #7c3aed; }
.badge--ep-review           { background: #0891b2; }
.badge--book-review         { background: #d97706; }
.badge--local               { background: var(--accent); }

/* fallback for any primary tag */
.badge--reggae              { background: var(--accent); }
.badge--dub                 { background: #065f46; }
.badge--dancehall           { background: #be185d; }
.badge--ska                 { background: #92400e; }
.badge--roots               { background: #166534; }

/* ── Star Rating ──────────────────────────────────────────── */
.stars {
    color: var(--accent);
    font-size: 1rem;
    letter-spacing: 1px;
    line-height: 1;
}
.stars--lg { font-size: 1.5rem; }

/* ── Post Hero (feature image, full-bleed) ────────────────── */
.post-hero {
    width: 100%;
    max-height: 520px;
    overflow: hidden;
    margin: 0;
    background: #111;
}
.post-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    max-height: 520px;
}
.post-hero__caption {
    padding: 8px 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* ── Post Cards ───────────────────────────────────────────── */
.post-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.post-card__image-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-alt);
}
.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.post-card:hover .post-card__image { transform: scale(1.04); }

.post-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 50%);
    display: flex;
    align-items: flex-start;
    padding: 10px;
}

.post-card__badges { display: flex; flex-wrap: wrap; gap: 6px; }

.post-card__content {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.post-card__rating { min-height: 1.2rem; }

.post-card__title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--accent); }

.post-card__excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex: 1;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 4px;
}
.post-card__sep { opacity: 0.4; }
.post-card__author { font-weight: 600; color: var(--text-muted); }
.post-card__date {}

/* ── Hero card (first post) ───────────────────────────────── */
.post-card--hero {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

@media (min-width: 768px) {
    .post-card--hero {
        grid-template-columns: 1fr 1fr;
    }
    .post-card--hero .post-card__image-link {
        aspect-ratio: auto;
        min-height: 340px;
    }
    .post-card--hero .post-card__content {
        padding: 32px 28px;
        justify-content: center;
    }
    .post-card--hero .post-card__title {
        font-size: 1.6rem;
    }
    .post-card--hero .post-card__excerpt {
        font-size: 1rem;
    }
}

/* ── Post Grid ────────────────────────────────────────────── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.post-grid--related { margin-top: 16px; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 40px 0 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.pagination .older-posts,
.pagination .newer-posts {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
}
.pagination .older-posts:hover,
.pagination .newer-posts:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent-dark);
}

/* ── Single Post ──────────────────────────────────────────── */
.post { padding: 48px 0 64px; }

.post__inner {
    max-width: 780px;
    margin: 0 auto;
}

.post__inner--narrow { max-width: var(--content-width); }

.post-header { margin-bottom: 36px; }

.post-header__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.post-header__rating { margin-bottom: 10px; }

.post-header__title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 16px;
}

.post-header__excerpt {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.post-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.post-header__author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
}
.post-header__author:hover { color: var(--accent); }

.post-header__author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-header__sep { opacity: 0.35; }

/* ── Post Content (Ghost card styles) ─────────────────────── */
.post-content.gh-content { font-family: var(--font-serif); font-size: 1.1rem; line-height: 1.75; }
.post-content h2, .post-content h3, .post-content h4 { font-family: var(--font-sans); margin: 2em 0 0.75em; line-height: 1.3; }
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content p { margin-bottom: 1.5em; }
.post-content ul, .post-content ol { margin: 0 0 1.5em 1.5em; padding: 0; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
    margin: 2em 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--accent);
    background: var(--accent-light);
    font-style: italic;
    color: var(--text-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-content figure { margin: 2em 0; }
.post-content figcaption { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 8px; font-family: var(--font-sans); }
.post-content img { border-radius: var(--radius); }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content a:hover { color: var(--accent-dark); }
.post-content code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.875em;
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
    color: #c2185b;
}
.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3em 0;
}

/* ── Post Footer / Tags ───────────────────────────────────── */
.post-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.post-tag {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.post-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* ── Author Box ───────────────────────────────────────────── */
.author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 32px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    margin: 40px 0;
}

.author-box__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-box__name {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 6px;
}
.author-box__name:hover { color: var(--accent); }

.author-box__bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Related Posts ────────────────────────────────────────── */
.related-posts {
    background: var(--bg-alt);
    padding: 48px 0;
    margin-top: 16px;
}

.related-posts__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

/* ── Tag Hero ─────────────────────────────────────────────── */
.tag-hero {
    background: var(--header-bg);
    color: #fff;
    padding: 56px 0;
}

.tag-hero--has-image {
    background-size: cover;
    background-position: center;
    position: relative;
}
.tag-hero--has-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.tag-hero--has-image .tag-hero__inner { position: relative; z-index: 1; }

.tag-hero__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

.tag-hero__title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.tag-hero__description {
    font-size: 1.05rem;
    opacity: 0.8;
    max-width: 600px;
    margin-bottom: 10px;
}

.tag-hero__count {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ── Author Hero ──────────────────────────────────────────── */
.author-hero {
    background: var(--bg-alt);
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}

.author-hero__inner {
    display: flex;
    align-items: center;
    gap: 28px;
}

.author-hero__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    flex-shrink: 0;
}

.author-hero__name {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.author-hero__bio {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 10px;
}

.author-hero__count {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.author-hero__social { display: flex; gap: 12px; }

.author-hero__social-link {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s;
}
.author-hero__social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.widget {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.widget--about { background: var(--accent); color: #fff; }
.widget--about .widget__title { color: #fff; }
.widget--about p { font-size: 0.9rem; opacity: 0.9; margin-bottom: 14px; }

.widget__title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.widget--about .widget__title { border-bottom-color: rgba(255,255,255,0.25); }

.widget__list { display: flex; flex-direction: column; gap: 2px; }

.widget__item { border-radius: var(--radius-sm); overflow: hidden; }

.widget__link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}
.widget__link:hover { background: var(--accent-light); color: var(--accent-dark); }

.widget__post-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget__post-date { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; font-weight: 600; }

.widget__empty { font-size: 0.875rem; color: var(--text-muted); }

.widget__social {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}
.widget__social:hover { color: #fff; }

/* Stats widget */
.stats-list { display: flex; flex-direction: column; gap: 10px; }

.stats-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.stats-list__label { color: var(--text); font-weight: 500; }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.tag-cloud__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tag-cloud__tag:hover,
.tag-cloud__tag--active {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-light);
}
.tag-cloud__count {
    font-size: 0.68rem;
    background: var(--bg-alt);
    padding: 1px 5px;
    border-radius: 10px;
    color: var(--text-muted);
}

/* ── Error Page ───────────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 100px 0 80px;
}

.error-page__code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 16px;
}

.error-page__title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.error-page__message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 32px 0;
    margin-top: auto;
    font-size: 0.875rem;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer__copy { opacity: 0.7; }

.site-footer__nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer__nav a { color: var(--footer-text); opacity: 0.6; transition: opacity 0.15s; }
.site-footer__nav a:hover { opacity: 1; color: var(--footer-text); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .has-sidebar .site-layout {
        grid-template-columns: 1fr 260px;
    }
}

@media (max-width: 768px) {
    /* Nav */
    .site-nav__toggle {
        display: flex;
    }
    .site-nav__list {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--header-bg);
        flex-direction: column;
        padding: 12px 16px 20px;
        border-top: 1px solid rgba(255,255,255,0.07);
        gap: 2px;
    }
    .site-nav__list.is-open {
        display: flex;
    }
    .site-nav__item { width: 100%; }
    .site-nav__link { width: 100%; display: block; }
    .site-header { position: relative; }

    /* Sidebar drops below on mobile */
    .has-sidebar .site-layout {
        grid-template-columns: 1fr;
    }

    /* Grid */
    .post-grid {
        grid-template-columns: 1fr;
    }

    /* Hero */
    .post-card--hero {
        grid-template-columns: 1fr;
    }

    /* Author hero */
    .author-hero__inner {
        flex-direction: column;
        text-align: center;
    }
    .author-hero__social { justify-content: center; }

    /* Footer */
    .site-footer__inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .post-header__title { font-size: 1.6rem; }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ── Ghost card width helpers (required by validator) ────── */
.kg-width-wide { margin: 0 -8vw; }
.kg-width-full { margin: 0 calc(50% - 50vw); width: 100vw; }

/* ── Ghost editor card overrides ──────────────────────────── */
.gh-content .kg-image-card img { border-radius: var(--radius); }
.gh-content .kg-gallery-card img { border-radius: var(--radius-sm); }
.gh-content .kg-bookmark-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.gh-content .kg-callout-card {
    border-left: 4px solid var(--accent);
    background: var(--accent-light);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 2em 0;
}
