/* The Brief — blog stylesheet (dark+gold, matches main site + tools) */

:root {
    --jsa-bg: #0A0E17;
    --jsa-bg-elevated: #111827;
    --jsa-bg-card: #172033;
    --jsa-text: #E8E6E1;
    --jsa-text-muted: #94A0B2;
    --jsa-text-dim: #8C97AA;
    --jsa-accent: #D4B878;
    --jsa-accent-light: #E5D09A;
    --jsa-accent-dark: #9A7D47;
    --jsa-pop-gold: #F5C96A;
    --jsa-pop-gold-hot: #FFD98A;
    --jsa-pop-gold-deep: #E8A94A;
    --jsa-pop-teal: #059669;
    --jsa-white: #FFFFFF;
    --jsa-border: rgba(255,255,255,0.08);
    --jsa-border-accent: rgba(212,184,120,0.22);
    --max-content: 1200px;
    --max-prose: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background: var(--jsa-bg);
    color: var(--jsa-text);
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle gold radial wash matching main site */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 60% 50% at 18% 22%, rgba(212,184,120,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 82% 78%, rgba(212,184,120,0.05) 0%, transparent 60%),
        radial-gradient(ellipse 40% 35% at 50% 110%, rgba(154,125,71,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: jsaDrift 28s ease-in-out infinite alternate;
}
@keyframes jsaDrift {
    from { transform: translate3d(0,0,0) scale(1); }
    to { transform: translate3d(-3%,-2%,0) scale(1.05); }
}

a { color: var(--jsa-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--jsa-accent-light); }

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

/* === Nav (matches main site + tools) === */
.jsa-nav {
    background: rgba(10,14,23,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212,184,120,0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.jsa-nav.scrolled {
    border-bottom: 2px solid transparent;
    background-image:
        linear-gradient(rgba(10,14,23,0.92), rgba(10,14,23,0.92)),
        linear-gradient(90deg, var(--jsa-pop-teal), var(--jsa-pop-gold));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 8px 32px -10px rgba(0,0,0,0.5);
}
.jsa-nav-inner {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.jsa-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--jsa-white);
    border-radius: 4px;
    padding: 0.25rem;
}
.jsa-nav-logo:focus-visible { outline: 2px solid var(--jsa-accent); outline-offset: 3px; }
.jsa-nav-logo img { width: 32px; height: 32px; object-fit: contain; }
.jsa-nav-logo-text { font-family: 'DM Serif Display', Georgia, serif; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--jsa-white); }
.jsa-nav-links { display: flex; align-items: center; gap: 1.25rem; }
.jsa-nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--jsa-text-muted);
    text-decoration: none;
    transition: color 0.2s;
    border-radius: 4px;
    padding: 0.25rem 0.35rem;
}
.jsa-nav-link:hover { color: var(--jsa-white); }
.jsa-nav-link:focus-visible, .jsa-nav-cta:focus-visible { outline: 2px solid var(--jsa-accent); outline-offset: 3px; }
.jsa-nav-cta {
    background: linear-gradient(135deg, var(--jsa-pop-gold-hot) 0%, var(--jsa-pop-gold) 50%, var(--jsa-pop-gold-deep) 100%);
    color: var(--jsa-bg);
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 14px -4px rgba(245,201,106,0.5);
    display: inline-block;
}
.jsa-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -4px rgba(212,184,120,0.55); color: var(--jsa-bg); }
/* Hamburger toggle (hidden by default on desktop) */
.jsa-nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: 1001; }
.jsa-nav-toggle span { display: block; width: 22px; height: 2px; background: var(--jsa-accent); margin: 5px 0; box-shadow: 0 0 8px rgba(212,184,120,0.40); border-radius: 2px; transition: all 0.3s; }
.jsa-nav-toggle:hover span { background: var(--jsa-accent-light); box-shadow: 0 0 12px rgba(244,227,184,0.55); }
.jsa-nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.jsa-nav-toggle.open span:nth-child(2) { opacity: 0; }
.jsa-nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
/* Mobile nav: show hamburger, hide nav links until .open */
@media (max-width: 640px) {
    .jsa-nav-toggle { display: block; }
    .jsa-nav-logo-text { display: none; }
    .jsa-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.5rem 1rem;
        background: linear-gradient(180deg, rgba(15,20,35,0.98), rgba(10,14,23,1));
        border-top: 1px solid rgba(212,184,120,0.35);
        border-bottom: 1px solid rgba(212,184,120,0.20);
        box-shadow: 0 12px 40px -10px rgba(0,0,0,0.6);
    }
    .jsa-nav-links.open { display: flex; }
    .jsa-nav-link { padding: 0.85rem 0; font-size: 1rem; width: 100%; border-bottom: 1px solid rgba(212,184,120,0.10); }
    .jsa-nav-link:last-of-type { border-bottom: none; }
    .jsa-nav-cta { margin-top: 0.75rem; text-align: center; width: 100%; padding: 0.85rem 1rem; }
}

/* === Main content area === */
.brief-main { position: relative; z-index: 1; }

/* === Hero (blog landing + tag pages) === */
.brief-hero {
    padding: 4rem 1.5rem 3rem;
    background: linear-gradient(180deg, rgba(38,30,16,0.20) 0%, transparent 100%);
    border-bottom: 1px solid rgba(212,184,120,0.10);
}
.brief-hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.brief-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--jsa-text-dim);
    margin-bottom: 0.85rem;
}
.brief-eyebrow a { color: var(--jsa-text-dim); }
.brief-eyebrow a:hover { color: var(--jsa-accent); }
.brief-h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--jsa-white);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 0.85rem;
}
.brief-hero-tagline {
    font-size: 1.05rem;
    color: var(--jsa-text-muted);
    line-height: 1.65;
    margin-bottom: 0.85rem;
}
.brief-hero-lead {
    font-size: 0.95rem;
    color: var(--jsa-text-muted);
    line-height: 1.65;
    max-width: 580px;
    margin: 0.4rem auto 1.5rem;
}
.brief-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}
.brief-hero-tag {
    font-size: 0.78rem;
    padding: 0.4rem 0.85rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.brief-hero-tag:hover {
    background: rgba(212,184,120,0.16);
    border-color: rgba(212,184,120,0.5);
    color: var(--jsa-pop-gold-hot);
}
.brief-hero-meta {
    font-size: 0.85rem;
    color: var(--jsa-text-dim);
}
.brief-hero-rss {
    color: var(--jsa-accent);
    font-weight: 500;
}
.brief-tag-highlight {
    color: var(--jsa-pop-gold-hot);
    font-style: italic;
}

/* === Listing cards (post previews) === */
.brief-listing { padding: 2.5rem 1.5rem 5rem; }
.brief-listing-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.brief-card {
    background: linear-gradient(180deg, rgba(28,32,46,0.78) 0%, rgba(20,24,36,0.85) 100%);
    border: 1px solid rgba(212,184,120,0.22);
    border-radius: 14px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.brief-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212,184,120,0.45);
    box-shadow: 0 18px 40px -16px rgba(0,0,0,0.55), 0 0 30px -10px rgba(212,184,120,0.18);
}
.brief-card__link {
    display: block;
    padding: 1.5rem 1.75rem;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
}
.brief-card__link:focus-visible { outline: 2px solid var(--jsa-accent); outline-offset: 2px; }
.brief-card__date {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--jsa-text-dim);
    display: block;
    margin-bottom: 0.5rem;
}
.brief-card__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.25;
    color: var(--jsa-white);
    letter-spacing: -0.01em;
    margin-bottom: 0.55rem;
    transition: color 0.2s;
}
.brief-card:hover .brief-card__title { color: var(--jsa-pop-gold-hot); }
.brief-card__desc {
    font-size: 0.95rem;
    color: var(--jsa-text-muted);
    line-height: 1.6;
    margin-bottom: 0.9rem;
}
.brief-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.brief-tag {
    display: inline-block;
    background: rgba(212,184,120,0.10);
    border: 1px solid rgba(212,184,120,0.25);
    color: var(--jsa-accent-light);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    transition: all 0.18s;
    text-decoration: none;
}
.brief-tag:hover { background: rgba(212,184,120,0.18); border-color: rgba(212,184,120,0.45); color: var(--jsa-pop-gold-hot); }

/* === Individual post pages === */
.brief-post-header {
    padding: 3.5rem 1.5rem 2rem;
    border-bottom: 1px solid rgba(212,184,120,0.10);
}
.brief-post-header-inner { max-width: var(--max-prose); margin: 0 auto; }
.brief-back-link {
    color: var(--jsa-accent);
    font-weight: 500;
    text-decoration: none;
}
.brief-back-link:hover { color: var(--jsa-accent-light); }
.brief-post-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2rem, 4.5vw, 2.85rem);
    color: var(--jsa-white);
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 1rem 0 1rem;
}
.brief-post-meta {
    font-size: 0.85rem;
    color: var(--jsa-text-dim);
}
.brief-post-meta-sep { margin: 0 0.5rem; opacity: 0.6; }
.brief-post-meta-author {
    color: var(--jsa-text-dim);
    text-decoration: none;
    border-bottom: 1px dotted rgba(212,184,120,0.3);
    transition: color 0.2s, border-color 0.2s;
}
.brief-post-meta-author:hover {
    color: var(--jsa-accent);
    border-bottom-color: var(--jsa-accent);
}
.brief-post-meta-updated { color: var(--jsa-text-dim); font-style: italic; opacity: 0.85; }

/* === Prose (Markdown body content) === */
.brief-prose { padding: 2.5rem 1.5rem 2rem; }
.brief-prose-inner { max-width: var(--max-prose); margin: 0 auto; font-size: 1.075rem; line-height: 1.8; color: var(--jsa-text); }
.brief-prose-inner h1, .brief-prose-inner h2, .brief-prose-inner h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    color: var(--jsa-white);
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 2.5rem 0 1rem;
}
.brief-prose-inner h1 { font-size: 2rem; }
.brief-prose-inner h2 { font-size: 1.6rem; padding-bottom: 0.45rem; border-bottom: 1px solid rgba(212,184,120,0.18); }
.brief-prose-inner h3 { font-size: 1.25rem; }
.brief-prose-inner h4, .brief-prose-inner h5, .brief-prose-inner h6 {
    color: var(--jsa-white);
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}
.brief-prose-inner h4 { font-size: 1.1rem; }
.brief-prose-inner p { margin: 0 0 1.4rem; }

/* Author block: side-by-side photo + bio. Used on welcome post and reusable
   as an "about the author" sign-off on individual posts. */
.brief-author-block {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    max-width: var(--max-prose);
    margin: 0 auto 2.75rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, rgba(212,184,120,0.05), rgba(212,184,120,0.02));
    border: 1px solid var(--jsa-border-accent);
    border-radius: 14px;
}
.brief-author-block__photo {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--jsa-border-accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.brief-author-block__info {
    flex: 1;
    min-width: 0;
}
.brief-author-block__name {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.55rem;
    color: var(--jsa-white);
    margin: 0 0 0.35rem;
    line-height: 1.15;
    letter-spacing: -0.005em;
}
.brief-author-block__title {
    color: var(--jsa-accent);
    font-size: 0.95rem;
    margin: 0 0 0.85rem;
    font-weight: 500;
    letter-spacing: 0.005em;
}
.brief-author-block__bio {
    color: var(--jsa-text-muted);
    font-size: 0.97rem;
    margin: 0;
    line-height: 1.55;
}
@media (max-width: 640px) {
    .brief-author-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
        padding: 1.5rem;
    }
    .brief-author-block__photo {
        width: 140px;
        height: 140px;
    }
    .brief-author-block__name {
        font-size: 1.4rem;
    }
}
.brief-prose-inner em { font-style: italic; color: var(--jsa-accent-light); }
.brief-prose-inner strong { color: var(--jsa-white); font-weight: 600; }
.brief-prose-inner ul, .brief-prose-inner ol { margin: 0 0 1.4rem 1.4rem; }
.brief-prose-inner ul li, .brief-prose-inner ol li { margin-bottom: 0.5rem; }
.brief-prose-inner ul li::marker { color: var(--jsa-accent); }
.brief-prose-inner ol li::marker { color: var(--jsa-accent); font-weight: 600; }
.brief-prose-inner a {
    color: var(--jsa-accent);
    border-bottom: 1px solid rgba(212,184,120,0.4);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.brief-prose-inner a:hover { color: var(--jsa-accent-light); border-color: var(--jsa-accent-light); }
.brief-prose-inner blockquote {
    border-left: 3px solid var(--jsa-accent);
    padding: 0.5rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(212,184,120,0.04);
    color: var(--jsa-text-muted);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}
.brief-prose-inner blockquote p:last-child { margin-bottom: 0; }
.brief-prose-inner code {
    background: rgba(212,184,120,0.10);
    color: var(--jsa-accent-light);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
    font-size: 0.92em;
}
.brief-prose-inner pre {
    background: rgba(20,24,36,0.85);
    border: 1px solid rgba(212,184,120,0.15);
    padding: 1.1rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0 0 1.4rem;
    line-height: 1.5;
}
.brief-prose-inner pre code {
    background: none;
    padding: 0;
    color: var(--jsa-text);
    font-size: 0.9rem;
}
.brief-prose-inner hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,184,120,0.35) 50%, transparent);
    margin: 2.5rem 0;
}
.brief-prose-inner img { border-radius: 8px; margin: 1.5rem 0; }
.brief-prose-inner table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.brief-prose-inner th, .brief-prose-inner td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(212,184,120,0.15);
    text-align: left;
}
.brief-prose-inner th {
    color: var(--jsa-white);
    font-weight: 600;
    background: rgba(212,184,120,0.06);
}

/* === Post footer (tags + CTA) === */
.brief-post-footer { padding: 2.5rem 1.5rem 4rem; }
.brief-post-footer-inner { max-width: var(--max-prose); margin: 0 auto; }
.brief-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212,184,120,0.15);
    margin-bottom: 3rem;
}
.brief-post-cta {
    background: linear-gradient(180deg, rgba(38,30,16,0.40) 0%, rgba(26,20,11,0.60) 100%);
    border: 1px solid rgba(212,184,120,0.30);
    border-top: 2px solid rgba(212,184,120,0.55);
    border-radius: 14px;
    padding: 2rem 1.75rem;
    text-align: center;
}
.brief-cta-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--jsa-accent);
    margin-bottom: 0.5rem;
}
.brief-cta-headline {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.45rem;
    color: var(--jsa-white);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}
.brief-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--jsa-pop-gold-hot) 0%, var(--jsa-pop-gold) 50%, var(--jsa-pop-gold-deep) 100%);
    color: var(--jsa-bg);
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 6px 18px -4px rgba(245,201,106,0.45), inset 0 1px 0 rgba(255,255,255,0.30);
    border: 1px solid var(--jsa-pop-gold);
}
.brief-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -6px rgba(245,201,106,0.6), inset 0 1px 0 rgba(255,255,255,0.45);
    color: var(--jsa-bg);
}
.brief-cta-sub {
    font-size: 0.78rem;
    color: var(--jsa-text-dim);
    margin-top: 0.85rem;
}

/* === Footer (matches main site) === */
.jsa-footer {
    background: var(--jsa-bg);
    border-top: 1px solid var(--jsa-border-accent);
    padding: 3rem 1.5rem 2rem;
    position: relative;
    margin-top: 3rem;
}
.jsa-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(212,184,120,0.35), rgba(184,134,11,0.50), rgba(212,184,120,0.35), transparent 95%);
}
.jsa-footer-inner { max-width: var(--max-content); margin: 0 auto; }
.jsa-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) { .jsa-footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.jsa-footer-bio {
    color: var(--jsa-text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0.5rem 0 0;
    max-width: 340px;
}
.jsa-footer-tagline {
    color: var(--jsa-accent);
    font-style: italic;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.jsa-footer-col h3 {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jsa-text-dim);
    margin-bottom: 0.85rem;
    font-family: 'Instrument Sans', sans-serif;
}
.jsa-footer-col ul { list-style: none; padding: 0; margin: 0; }
.jsa-footer-col li { margin-bottom: 0.55rem; }
.jsa-footer-col a {
    color: var(--jsa-text-muted);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.2s;
}
.jsa-footer-col a:hover { color: var(--jsa-accent); }
.jsa-footer-bottom {
    font-size: 0.75rem;
    color: var(--jsa-text-dim);
    text-align: center;
    border-top: 1px solid var(--jsa-border);
    padding-top: 1.5rem;
    line-height: 1.65;
    max-width: 900px;
    margin: 0 auto;
}

/* Selection */
::selection { background: var(--jsa-accent-light); color: var(--jsa-bg); }
