/* public/assets/pauleli/marshal/theme.css */
:root {
    /* Alchemy Color Scheme */
    --marshal-gold: #D4AF37;        /* Alchemical Gold */
    --marshal-bronze: #CD7F32;      /* Bronze */
    --marshal-copper: #B87333;      /* Copper */
    --marshal-silver: #C0C0C0;      /* Silver */
    --marshal-charcoal: #36454F;    /* Charcoal */
    --marshal-deep-blue: #1B263B;   /* Deep Blue */
    --marshal-black: #0D1117;       /* Near Black */

    /* Primary Theme Colors */
    --marshal-primary: #CD7F32;     /* Bronze - primary accent */
    --marshal-secondary: #B87333;   /* Copper - secondary accent */
    --marshal-accent: #D4AF37;      /* Gold - highlights */
    --marshal-bg: #0D1117;          /* Near Black - background */
    --marshal-bg-secondary: #1B263B; /* Deep Blue - secondary bg */
    --marshal-text: #C0C0C0;        /* Silver - main text */
    --marshal-text-dim: #36454F;    /* Charcoal - dimmed text */

    /* Typography */
    --marshal-font: 'Patrick Hand', cursive;
    --marshal-font-code: 'JetBrains Mono', monospace;
    --marshal-font-title: 'Uncial Antiqua', cursive;
}

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

body {
    font-family: var(--marshal-font);
    background: var(--marshal-bg);
    color: var(--marshal-text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Mystical Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(205, 127, 50, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ====================================
   INDEX PAGE STYLES
   ==================================== */

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
    border-bottom: 2px solid var(--marshal-bronze);
}

.site-title {
    font-family: var(--marshal-font-title);
    font-size: 3.5rem;
    color: var(--marshal-gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.site-subtitle {
    font-size: 1.2rem;
    color: var(--marshal-text);
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Navigation */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.nav-link {
    color: var(--marshal-bronze);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--marshal-bronze);
    color: var(--marshal-bg);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
    transform: translateY(-2px);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Post Card */
.post-card {
    background: rgba(27, 38, 59, 0.3);
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(205, 127, 50, 0.3);
    border-color: var(--marshal-gold);
}

/* Post Meta (date, reading time) */
.post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--marshal-text);
    opacity: 0.7;
    flex-wrap: wrap;
}

.post-date,
.reading-time {
    color: var(--marshal-copper);
}

.difficulty-badge {
    background: rgba(205, 127, 50, 0.2);
    color: var(--marshal-gold);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid var(--marshal-bronze);
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

/* Post Title (in card) */
.post-card .post-title {
    font-family: var(--marshal-font-title);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-card .post-title a {
    color: var(--marshal-gold);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.post-card .post-title a:hover {
    color: var(--marshal-accent);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* Post Excerpt */
.post-excerpt {
    color: var(--marshal-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Post Footer */
.post-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Categories (in card) */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.category {
    background: var(--marshal-bg-secondary);
    color: var(--marshal-bronze);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid var(--marshal-bronze);
    transition: all 0.3s ease;
}

.category:hover {
    background: var(--marshal-bronze);
    color: var(--marshal-bg);
}

/* Tags (in card) */
.post-card .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-card .tag {
    background: rgba(184, 115, 51, 0.15);
    color: var(--marshal-text);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    text-decoration: none;
    font-size: 0.75rem;
    border: 1px solid var(--marshal-copper);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.post-card .tag:hover {
    background: var(--marshal-copper);
    color: var(--marshal-bg);
    opacity: 1;
}

/* Read More Link */
.read-more {
    align-self: flex-end;
    color: var(--marshal-gold);
    text-decoration: none;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: inline-block;
}

.read-more:hover {
    background: var(--marshal-bronze);
    color: var(--marshal-bg);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
    transform: translateX(5px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(27, 38, 59, 0.3);
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.empty-state h3 {
    font-family: var(--marshal-font-title);
    font-size: 2rem;
    color: var(--marshal-gold);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--marshal-text);
    opacity: 0.8;
    line-height: 1.8;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

/* ====================================
   BLOG POST SHOW PAGE STYLES
   ==================================== */

/* Base Theme */
.marshal-theme {
    font-family: var(--marshal-font);
    background: var(--marshal-bg);
    color: var(--marshal-text);
    line-height: 1.2;
    min-height: 100vh;
    position: relative;
}

/* Mystical Background Gradient */
.marshal-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(205, 127, 50, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Show Page Navigation Header */
.show-nav {
    position: sticky;
    top: 0;
    background: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid var(--marshal-bronze);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
}

.show-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-back,
.nav-home {
    color: var(--marshal-bronze);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-back:hover,
.nav-home:hover {
    background: var(--marshal-bronze);
    color: var(--marshal-bg);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
    transform: translateY(-2px);
}

/* Post Header */
.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-header .post-title {
    font-family: var(--marshal-font-title);
    font-size: 3rem;
    font-weight: 700;
    color: var(--marshal-accent);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.post-header .post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1rem;
    color: var(--marshal-text);
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Categories */
.post-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-badge {
    background: var(--marshal-bg-secondary);
    color: var(--marshal-accent);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: 1px solid var(--marshal-bronze);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.category-badge:hover {
    background: var(--marshal-bronze);
    color: var(--marshal-bg);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
    transform: translateY(-2px);
}

/* Post Content Container */
.post-content {
    font-size: 1.3em;
    background: rgba(27, 38, 59, 0.3);
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.5rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Markdown Content Styling */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: var(--marshal-font-title);
    color: var(--marshal-gold);
    margin: 2rem 0 1rem 0;
    position: relative;
    letter-spacing: 0.03em;
}

.post-content h1 {
    font-size: 2.25rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.post-content h2 {
    font-size: 2rem;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}
.post-content h3 {
    font-size: 1.75rem;
    color: var(--marshal-bronze);
}
.post-content h4 {
    font-size: 1.5rem;
    color: var(--marshal-bronze);
}
.post-content h5 {
    font-size: 1.25rem;
    color: var(--marshal-copper);
}
.post-content h6 {
    font-size: 1.125rem;
    color: var(--marshal-copper);
}

/* Header Anchors */
.header-anchor {
    color: var(--marshal-bronze);
    text-decoration: none;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: normal;
}

.post-content h1:hover .header-anchor,
.post-content h2:hover .header-anchor,
.post-content h3:hover .header-anchor,
.post-content h4:hover .header-anchor,
.post-content h5:hover .header-anchor,
.post-content h6:hover .header-anchor {
    opacity: 1;
}

/* Paragraphs */
.post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Text Emphasis */
.post-content strong {
    color: var(--marshal-gold);
    font-weight: bold;
}

.post-content em {
    color: var(--marshal-bronze);
    font-style: italic;
}

/* Blockquotes */
.post-content blockquote {
    border-left: 3px solid var(--marshal-bronze);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--marshal-text);
    opacity: 0.95;
    background: rgba(205, 127, 50, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 0.25rem;
}

/* Lists */
.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

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

.post-content li::marker {
    color: var(--marshal-bronze);
}

/* Links */
.post-content a {
    color: var(--marshal-gold);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.post-content a:hover {
    color: var(--marshal-accent);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 2px solid var(--marshal-bronze);
    margin: 2rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.post-content th,
.post-content td {
    border: 1px solid var(--marshal-bronze);
    padding: 0.75rem;
    text-align: left;
}

.post-content th {
    background: var(--marshal-bg-secondary);
    color: var(--marshal-gold);
    font-weight: bold;
}

.post-content tr:hover {
    background: rgba(205, 127, 50, 0.05);
}

/* Horizontal Rule */
.post-content hr {
    border: none;
    border-top: 2px solid var(--marshal-bronze);
    margin: 2rem 0;
    opacity: 0.5;
}

/* Code Styling */
.post-content code {
    background: rgba(205, 127, 50, 0.15);
    color: var(--marshal-gold);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: var(--marshal-font-code);
    font-size: 0.9em;
    border: 1px solid rgba(205, 127, 50, 0.3);
}

.post-content pre {
    background: var(--marshal-bg-secondary);
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.post-content pre code {
    background: none;
    color: var(--marshal-text);
    padding: 0;
    border: none;
}

/* Copy Button for Code Blocks */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--marshal-bronze);
    color: var(--marshal-bg);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
    font-family: var(--marshal-font);
}

.post-content pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: var(--marshal-gold);
    color: var(--marshal-bg);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Tags Section */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.tag {
    background: rgba(184, 115, 51, 0.2);
    color: var(--marshal-text);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid var(--marshal-copper);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--marshal-copper);
    color: var(--marshal-bg);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(184, 115, 51, 0.4);
}

/* Table of Contents */
.table-of-contents {
    background: rgba(27, 38, 59, 0.5);
    border: 1px solid var(--marshal-bronze);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.toc-title {
    color: var(--marshal-gold);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    font-family: var(--marshal-font-title);
    letter-spacing: 0.03em;
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    color: var(--marshal-text);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.toc-link:hover {
    color: var(--marshal-gold);
    transform: translateX(4px);
}

.toc-level-2 { margin-left: 1rem; }
.toc-level-3 { margin-left: 2rem; }
.toc-level-4 { margin-left: 3rem; }
.toc-level-5 { margin-left: 4rem; }
.toc-level-6 { margin-left: 5rem; }

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(205, 127, 50, 0.2);
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--marshal-bronze), var(--marshal-gold));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .container,
    .blog-container {
        padding: 1rem;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .site-subtitle {
        font-size: 1rem;
    }

    .show-nav-container {
        padding: 0 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-card {
        padding: 1.5rem;
    }

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

    .post-content {
        padding: 1.5rem;
        font-size: 1.1em;
    }

    .post-header .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .post-categories {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    body::before,
    .marshal-theme::before,
    .reading-progress,
    .copy-button,
    .post-tags,
    .nav-links {
        display: none;
    }

    .post-content {
        border: none;
        background: white;
        color: black;
    }
}