/* ============================================
   Sound Money Press - Custom Theme Styles
   ============================================ */

/* --- Base & Typography --- */
:root {
    --color-amber: #f59e0b;
    --color-amber-light: #fbbf24;
    --color-amber-dark: #d97706;
    --color-bg-primary: #030712;
    --color-bg-secondary: #111827;
    --color-bg-card: #0f172a;
    --color-text-primary: #e5e7eb;
    --color-text-secondary: #9ca3af;
    --color-border: #1f2937;
}

html {
    scroll-behavior: smooth;
}

.smp-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

.font-display {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* --- Navigation --- */
.smp-nav {
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.smp-nav.scrolled {
    background: rgba(3, 7, 18, 0.95);
    border-bottom-color: rgba(245, 158, 11, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Hero Section --- */
.smp-hero {
    background: var(--color-bg-primary);
}

.smp-hero-pattern {
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(217, 119, 6, 0.04) 0%, transparent 50%);
}

.smp-hero-content {
    animation: heroFadeIn 1.2s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Parallax Divider --- */
.smp-parallax-divider {
    background: var(--color-bg-secondary);
}

.smp-divider-pattern {
    background-image:
        radial-gradient(ellipse at 30% 50%, rgba(245, 158, 11, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(217, 119, 6, 0.04) 0%, transparent 60%);
}

/* --- Post Content Typography --- */
.smp-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #d1d5db;
}

.smp-content h1,
.smp-content h2,
.smp-content h3,
.smp-content h4,
.smp-content h5,
.smp-content h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #f9fafb;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.smp-content h2 {
    font-size: 1.875rem;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--color-border);
}

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

.smp-content h4 {
    font-size: 1.25rem;
}

.smp-content p {
    margin-bottom: 1.5em;
}

.smp-content a {
    color: var(--color-amber);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(245, 158, 11, 0.3);
    transition: all 0.2s ease;
}

.smp-content a:hover {
    color: var(--color-amber-light);
    text-decoration-color: var(--color-amber-light);
}

.smp-content strong {
    color: #f3f4f6;
    font-weight: 600;
}

.smp-content em {
    color: #e5e7eb;
}

.smp-content blockquote {
    border-left: 3px solid var(--color-amber);
    padding: 1em 1.5em;
    margin: 2em 0;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #d1d5db;
}

.smp-content blockquote p:last-child {
    margin-bottom: 0;
}

.smp-content ul,
.smp-content ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.smp-content li {
    margin-bottom: 0.5em;
}

.smp-content ul li::marker {
    color: var(--color-amber);
}

.smp-content ol li::marker {
    color: var(--color-amber);
    font-weight: 600;
}

.smp-content code {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-amber-light);
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.smp-content pre {
    background: #0d1117;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5em;
    overflow-x: auto;
    margin: 2em 0;
}

.smp-content pre code {
    background: none;
    color: #e5e7eb;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.smp-content img {
    border-radius: 0.75rem;
    margin: 2em auto;
    max-width: 100%;
    height: auto;
}

.smp-content figure {
    margin: 2em 0;
}

.smp-content figcaption {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.75em;
    font-style: italic;
}

.smp-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-amber), transparent);
    margin: 3em 0;
    opacity: 0.3;
}

.smp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.95rem;
}

.smp-content th {
    background: var(--color-bg-secondary);
    color: var(--color-amber);
    font-weight: 600;
    text-align: left;
    padding: 0.75em 1em;
    border-bottom: 2px solid var(--color-amber);
}

.smp-content td {
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--color-border);
}

/* --- Ghost-specific cards --- */
.smp-content .kg-card {
    margin: 2em 0;
}

.smp-content .kg-image-card img {
    margin: 0 auto;
}

.smp-content .kg-width-wide {
    max-width: 1040px;
    margin-left: calc(50% - 520px);
    margin-right: calc(50% - 520px);
}

.smp-content .kg-width-full {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.smp-content .kg-bookmark-card {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s;
}

.smp-content .kg-bookmark-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.smp-content .kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.smp-content .kg-bookmark-content {
    padding: 1.25em;
    flex: 1;
}

.smp-content .kg-bookmark-title {
    font-weight: 600;
    color: #f3f4f6;
    font-size: 1rem;
}

.smp-content .kg-bookmark-description {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smp-content .kg-bookmark-metadata {
    display: flex;
    align-items: center;
    margin-top: 0.75em;
    font-size: 0.8rem;
    color: #6b7280;
}

.smp-content .kg-bookmark-thumbnail {
    width: 200px;
    min-height: 100%;
}

.smp-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

/* --- Line Clamp Utility --- */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* --- Selection --- */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .smp-content {
        font-size: 1rem;
    }

    .smp-content h2 {
        font-size: 1.5rem;
    }

    .smp-content h3 {
        font-size: 1.25rem;
    }

    .smp-content .kg-width-wide,
    .smp-content .kg-width-full {
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .smp-content .kg-bookmark-container {
        flex-direction: column;
    }

    .smp-content .kg-bookmark-thumbnail {
        width: 100%;
        height: 200px;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smp-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}
