/* GeoPulse Signals Theme - Inspired by antitoil aesthetic */

:root {
    /* Dark theme colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --bg-tertiary: #2d2d2d;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --text-muted: #707070;
    --accent: #ff6b35;
    --accent-hover: #ff8555;
    --border: #3a3a3a;
    --border-light: #2d2d2d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--accent-hover);
}

/* Layout */
.site-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Post/Article Styles */
article {
    margin-bottom: 4rem;
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-title a {
    color: var(--text-primary);
}

.post-title a:hover {
    color: var(--accent);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

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

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-tags a {
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.post-tags a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

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

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

.post-content code {
    background: var(--bg-secondary);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
}

.post-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content a {
    border-bottom: 1px solid var(--accent);
    transition: border-color 0.2s ease;
}

.post-content a:hover {
    border-bottom-color: var(--accent-hover);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-top: 1rem;
    line-height: 1.7;
}

/* Signal Card Styles */
.signal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.signal-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.signal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.signal-header h3 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 200px;
}

.confidence-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.confidence-badge.confidence-green {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.confidence-badge.confidence-yellow {
    background-color: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.confidence-badge.confidence-orange {
    background-color: rgba(255, 107, 53, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.confidence-badge.confidence-gray {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.certainty-score {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.signal-content {
    margin-bottom: 1.5rem;
}

.signal-summary {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.signal-metrics {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.signal-citations {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.signal-citations h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.citation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.citation-list li {
    font-size: 0.875rem;
}

.citation-list a {
    color: var(--accent);
    word-break: break-all;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.citation-list a:hover {
    border-bottom-color: var(--accent);
}

/* Issue Header Styles */
.issue-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.issue-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.issue-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.issue-cadence {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.issue-intro {
    margin-bottom: 3rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.125rem;
}

.signals-container {
    margin-bottom: 4rem;
}

.issue-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.issue-footer-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Page template styles */
.page-feature-image {
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
}

.page-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-header {
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.page-content {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

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

.pagination a {
    color: var(--accent);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.pagination a:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

/* Koenig Editor Wide Image Support */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: 50%;
    transform: translateX(-50%);
    max-width: 1140px;
    border-radius: 8px;
    overflow: hidden;
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: none;
    border-radius: 0;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-main {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .post-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .signal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .citation-list {
        grid-template-columns: 1fr;
    }
    
    .signal-metrics {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .kg-width-wide {
        width: 100%;
        margin-left: 0;
        transform: none;
        border-radius: 0;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .pagination a {
        text-align: center;
    }
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Ghost-specific styles */
.ghost-foot {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}