/* ========================================
   Spark — Midnight Theme
   Research-backed dark mode for night reading
   ======================================== */

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #f59e0b;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fbbf24;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

/* --- Layout --- */
main {
    flex: 1;
    width: 100%;
    max-width: 65ch;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    max-width: 65ch;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e0e0e0;
}

.logo:hover {
    color: #f59e0b;
}

nav a {
    color: #888;
    font-size: 0.9rem;
}

nav a:hover {
    color: #e0e0e0;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #666;
    font-size: 0.85rem;
}

footer .subtle {
    margin-top: 0.5rem;
}

footer a {
    color: #888;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 3rem 0 4rem;
}

.hero h1 {
    margin-bottom: 1rem;
    color: #fff;
}

.tagline {
    color: #999;
    max-width: 50ch;
    margin: 0 auto;
}

/* --- Cards Section --- */
.cards {
    margin-bottom: 3rem;
}

.cards h2 {
    margin-bottom: 1.5rem;
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Card --- */
.card {
    background: #1a1a1a;
    border-radius: 16px;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.card a {
    display: block;
    padding: 1.5rem;
    color: inherit;
}

.card h3 {
    color: #fff;
    margin: 0.75rem 0 0.5rem;
}

.card .teaser {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.card .meta {
    color: #666;
    font-size: 0.8rem;
}

/* --- Pillar Tags --- */
.pillar {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background: #2a2a2a;
}

.pillar-think {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}

.pillar-create {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.15);
}

.pillar-build {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.pillar-learn {
    color: #2dd4bf;
    background: rgba(45, 212, 191, 0.15);
}

/* --- View All Link --- */
.view-all {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* --- Empty State --- */
.empty {
    color: #666;
    text-align: center;
    padding: 3rem 0;
}

/* --- Subscribe Section --- */
.subscribe {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.subscribe h2 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.subscribe p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.subscribe-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: #f59e0b;
    color: #121212;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.subscribe-btn:hover {
    background: #fbbf24;
    color: #121212;
    transform: translateY(-2px);
}

/* --- Single Insight View --- */
.insight-full {
    padding: 1rem 0;
}

.insight-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-header .meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: #666;
    font-size: 0.85rem;
}

.insight-header .meta .sep {
    color: #444;
}

.insight-header h1 {
    color: #fff;
    margin: 0;
}

/* Hero Media */
.hero-media {
    margin: 2rem 0;
}

.hero-media img,
.hero-media video {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.hero-media figcaption,
.inline-media figcaption {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Inline Media */
.inline-media {
    margin: 2rem 0;
}

.inline-media img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* Article Body - Flowing Prose */
.insight-body {
    margin: 2rem 0;
}

.insight-body p {
    color: #e0e0e0;
    line-height: 1.8;
    margin: 0 0 1.5rem 0;
}

.insight-body .hook {
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

/* Share Section */
.share-section {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #1a1a1a;
    border-radius: 12px;
    text-align: center;
}

.share-prompt {
    color: #e0e0e0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Video Section */
.video-section {
    margin: 2.5rem 0;
    padding-top: 2rem;
    border-top: 1px solid #2a2a2a;
}

.video-heading {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.video-intro {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.video-media {
    margin-bottom: 1rem;
}

.video-media video {
    width: 100%;
    border-radius: 12px;
}

.video-share-btn {
    margin-top: 0.5rem;
}

/* Share Buttons */
.share-btn {
    background: #f59e0b;
    color: #121212;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: #fbbf24;
    transform: translateY(-2px);
}

.share-btn-secondary {
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.share-btn-secondary:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #333;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.insight-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #2a2a2a;
}

.insight-footer .source {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.back {
    color: #888;
    font-size: 0.9rem;
}

.back:hover {
    color: #f59e0b;
}

/* --- Archive --- */
.archive-header {
    margin-bottom: 2rem;
}

.archive-header h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.pillar-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pillar-filter .pillar {
    transition: transform 0.2s ease;
}

.pillar-filter .pillar:hover {
    transform: scale(1.05);
}

/* --- Responsive --- */
@media (max-width: 480px) {
    html {
        font-size: 16px;
    }
    
    .hero {
        padding: 2rem 0 3rem;
    }
    

}
