/* ── Variables ── */
:root {
    --bg:              #0e0f11;
    --bg-card:         #13141a;
    --bg-card-hover:   #16171e;
    --line:            rgba(255,255,255,0.045);
    --gold:            #c8900a;
    --gold2:           #e8a820;
    --gold-border:     rgba(200,144,10,0.22);
    --gold-border-h:   rgba(200,144,10,0.55);
    --text:            #f0ece4;
    --muted:           rgba(240,236,228,0.55);
    --soft:            rgba(240,236,228,0.25);
    --font-serif:      'Cormorant', Georgia, serif;
    --font-sans:       'Jost', system-ui, sans-serif;
    --header-h:        64px;
    --max-w:           1280px;
    --gap:             1px;
}

/* ── Hide Ghost Portal floating button (we use our own in header) ── */
#gh-portal-trigger { display: none !important; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Grid background ── */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 30%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── Container ── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}
.container--narrow { max-width: 760px; }

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    height: var(--header-h);
    background: rgba(14,15,17,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gold-border);
    z-index: 100;
}
.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}
.site-logo { display: flex; align-items: center; color: var(--gold2) !important; }
.site-logo img { height: 32px; width: auto; }
.site-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--gold2) !important;
}
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 28px; list-style: none; }
.site-nav a {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
}
.site-nav a:hover,
.site-nav a.current { color: var(--gold2); }

.site-nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 20px;
}
.nav-btn {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 2px;
    border: 1px solid var(--gold-border);
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-btn--ghost { color: var(--muted); background: transparent; }
.nav-btn--ghost:hover { color: var(--gold2); border-color: var(--gold-border-h); }
.nav-btn--solid { color: var(--bg); background: var(--gold2); border-color: var(--gold2); }
.nav-btn--solid:hover { background: var(--gold); border-color: var(--gold); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--muted);
    transition: all 0.25s;
}

/* ── Eyebrow ── */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    margin-bottom: 32px;
}
.eyebrow::before,
.eyebrow::after {
    content: '' !important;
    display: block !important;
    height: 1px !important;
    width: 48px !important;
    min-width: 48px !important;
    flex-shrink: 0 !important;
    background: linear-gradient(90deg, transparent, var(--gold)) !important;
}
.eyebrow::after {
    background: linear-gradient(90deg, var(--gold), transparent) !important;
}
.eyebrow-text {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
}

/* ── Site content ── */
.site-content { position: relative; z-index: 1; padding-bottom: 80px; }

/* ── Feed header ── */
.feed-header { padding: 56px 0 16px; }

/* ── Magazine post grid ── */
.post-feed {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gap);
    background: var(--gold-border);
    border: 1px solid var(--gold-border);
    margin-bottom: 48px;
}

/* Hero: first post full width */
.post-feed .post-card:nth-child(1) { grid-column: span 6; }
/* Second row: 2 medium cards */
.post-feed .post-card:nth-child(2),
.post-feed .post-card:nth-child(3) { grid-column: span 3; }
/* Remaining: 3-column grid */
.post-feed .post-card:nth-child(n+4) { grid-column: span 2; }

/* ── Post card ── */
.post-card {
    background: var(--bg-card);
    transition: background 0.25s;
    overflow: hidden;
}
.post-card:hover { background: var(--bg-card-hover); }
.post-card-link { display: flex; flex-direction: column; height: 100%; }

/* Image */
.post-card-image-wrap { overflow: hidden; }
.post-card-image {
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}
.post-card:hover .post-card-image { transform: scale(1.03); }
.post-card-no-image {
    background: rgba(200,144,10,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-card-no-image-icon {
    font-size: 28px;
    color: var(--gold-border);
}

/* Image heights by position */
.post-feed .post-card:nth-child(1) .post-card-image { height: 52vh; min-height: 320px; }
.post-feed .post-card:nth-child(1) .post-card-no-image { height: 52vh; min-height: 320px; }
.post-feed .post-card:nth-child(2) .post-card-image,
.post-feed .post-card:nth-child(3) .post-card-image { height: 38vh; min-height: 240px; }
.post-feed .post-card:nth-child(2) .post-card-no-image,
.post-feed .post-card:nth-child(3) .post-card-no-image { height: 38vh; min-height: 240px; }
.post-feed .post-card:nth-child(n+4) .post-card-image { height: 26vh; min-height: 180px; }
.post-feed .post-card:nth-child(n+4) .post-card-no-image { height: 26vh; min-height: 180px; }

/* Content */
.post-card-content {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-card-tag {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold2);
    margin-bottom: 10px;
    display: block;
}
.post-card-title {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 12px;
}
/* Title sizes by card position */
.post-feed .post-card:nth-child(1) .post-card-title  { font-size: clamp(28px, 3.5vw, 48px); }
.post-feed .post-card:nth-child(2) .post-card-title,
.post-feed .post-card:nth-child(3) .post-card-title  { font-size: clamp(22px, 2.2vw, 32px); }
.post-feed .post-card:nth-child(n+4) .post-card-title { font-size: clamp(17px, 1.4vw, 22px); }

.post-card-excerpt {
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted);
    margin-bottom: 16px;
    flex: 1;
}
/* No excerpt on small cards */
.post-feed .post-card:nth-child(n+4) .post-card-excerpt { display: none; }

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.post-card-date { font-size: 11px; letter-spacing: 1px; color: var(--soft); }
.post-card-author { font-size: 11px; letter-spacing: 1px; color: var(--soft); }
.post-card-author::before { content: '·'; margin-right: 12px; }

/* ── Related posts (narrower grid) ── */
.post-feed--related { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.post-feed--related .post-card { grid-column: span 1 !important; }
.post-feed--related .post-card .post-card-image { height: 22vh !important; min-height: 160px !important; }
.post-feed--related .post-card .post-card-title { font-size: 18px !important; }
.post-feed--related .post-card .post-card-excerpt { display: none; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px 0;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}
.pagination a {
    border: 1px solid var(--gold-border);
    padding: 8px 20px;
    border-radius: 2px;
    transition: all 0.2s;
    color: var(--muted);
}
.pagination a:hover {
    border-color: var(--gold-border-h);
    color: var(--gold2);
    background: rgba(200,144,10,0.06);
}

/* ── Single post ── */
.post-page { padding-top: 56px; }
.post-header { padding-bottom: 40px; }
.post-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--gold2);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gold-border);
    padding-bottom: 3px;
    transition: color 0.2s, border-color 0.2s;
}
.post-tag:hover { color: var(--gold); border-color: var(--gold); }
.post-title {
    font-family: var(--font-serif);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 600;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 20px;
}
.post-excerpt {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 24px;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--soft);
}
.post-meta-sep { opacity: 0.4; }
.post-meta-author { color: var(--muted); }
.post-feature-image {
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
    margin-bottom: 48px;
}
.post-feature-image img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
}

/* ── Post content typography ── */
.gh-content {
    padding: 0 0 56px;
    font-size: 17px;
    line-height: 1.85;
    color: rgba(240,236,228,0.88);
}
.gh-content h2 {
    font-family: var(--font-serif);
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 600;
    color: var(--text);
    margin: 52px 0 20px;
    line-height: 1.2;
}
.gh-content h3 {
    font-family: var(--font-serif);
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 600;
    color: var(--text);
    margin: 40px 0 16px;
}
.gh-content p { margin-bottom: 24px; }
.gh-content a { color: var(--gold2); border-bottom: 1px solid var(--gold-border); transition: border-color 0.2s; }
.gh-content a:hover { border-color: var(--gold); }
.gh-content img { border-radius: 2px; margin: 32px auto; }
.gh-content blockquote {
    border-left: 2px solid var(--gold);
    padding-left: 24px;
    margin: 32px 0;
    color: var(--muted);
    font-family: var(--font-serif);
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
}
.gh-content ul, .gh-content ol {
    padding-left: 24px;
    margin-bottom: 24px;
}
.gh-content li { margin-bottom: 8px; }
.gh-content pre {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--gold-border);
    padding: 20px 24px;
    border-radius: 2px;
    overflow-x: auto;
    margin-bottom: 24px;
    font-size: 14px;
}
.gh-content code {
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 14px;
}
.gh-content hr {
    border: none;
    border-top: 1px solid var(--gold-border);
    margin: 48px 0;
}

/* ── Post footer ── */
.post-footer { padding-bottom: 64px; }
.post-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
    margin-bottom: 28px;
}
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.post-tag-link {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid var(--gold-border);
    padding: 5px 14px;
    border-radius: 2px;
    color: var(--muted);
    transition: all 0.2s;
}
.post-tag-link:hover { border-color: var(--gold-border-h); color: var(--gold2); }
.post-author-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 28px;
    border: 1px solid var(--gold-border);
    border-radius: 2px;
    background: var(--bg-card);
}
.post-author-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--gold-border);
}
.post-author-name {
    display: block;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.post-author-bio { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ── Related posts ── */
.related-posts {
    padding: 56px 0 80px;
    border-top: 1px solid var(--gold-border);
}
.related-posts .eyebrow { margin-bottom: 32px; }

/* ── Static pages ── */
.page-page { padding-top: 56px; }
.page-header { padding-bottom: 32px; }
.page-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 20px;
}
.page-divider {
    height: 1px;
    width: 80px;
    background: linear-gradient(90deg, var(--gold), transparent);
}
.page-content { padding-bottom: 80px; }

/* ── Tag page ── */
.tag-header { padding: 56px 0 40px; text-align: center; }
.tag-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}
.tag-desc { color: var(--muted); font-size: 16px; }

/* ── Error page ── */
.error-page { padding-top: 80px; }
.error-content { text-align: center; }
.error-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 600;
    margin-bottom: 16px;
}
.error-desc { color: var(--muted); margin-bottom: 32px; }
.error-link {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold2);
    border-bottom: 1px solid var(--gold-border);
    padding-bottom: 3px;
    transition: border-color 0.2s;
}
.error-link:hover { border-color: var(--gold); }

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--gold-border);
    padding: 40px 0;
    position: relative;
    z-index: 1;
}
.footer-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}
.footer-brand {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--gold2) !important;
    letter-spacing: 0.5px;
}
.footer-nav { margin-left: auto; }
.footer-nav ul { display: flex; gap: 24px; list-style: none; }
.footer-nav a {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
}
.footer-nav a:hover { color: var(--gold2); }
.footer-copy {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .post-feed .post-card:nth-child(n+4) { grid-column: span 3; }
}

@media (max-width: 768px) {
    :root { --header-h: 56px; }
    .site-nav { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: rgba(14,15,17,0.98); border-bottom: 1px solid var(--gold-border); padding: 24px; }
    .site-nav.is-open { display: flex; }
    .site-nav ul { flex-direction: column; gap: 16px; }
    .menu-toggle { display: flex; }
    .post-feed { grid-template-columns: 1fr; }
    .post-feed .post-card,
    .post-feed .post-card:nth-child(n) { grid-column: span 1; }
    .post-feed .post-card:nth-child(1) .post-card-image { height: 40vw; }
    .post-feed .post-card:nth-child(n) .post-card-image { height: 48vw; min-height: 200px; }
    .post-feed .post-card:nth-child(n+4) .post-card-excerpt { display: block; }
    .post-feed--related { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-nav { margin-left: 0; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .post-card-content { padding: 18px 20px 22px; }
}
