/* ========================================
   Blog Styles - 10desires.xyz
   Requires: /css/shared.css (loaded via HTML)
   ======================================== */

/* ========================================
   Blog Hero
   ======================================== */
.blog-hero {
    padding: 10rem 4rem 4rem;
}

.blog-hero-content {
    max-width: 900px;
}

.section-number {
    font-family: var(--serif);
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.blog-hero h1 {
    font-family: var(--serif);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.blog-hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.blog-description {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 500px;
    line-height: 1.6;
}

/* ========================================
   Blog Section
   ======================================== */
.blog-section {
    padding: 4rem;
    border-top: 1px solid var(--border);
}

.blog-section-header {
    margin-bottom: 3rem;
}

.blog-section-header h2 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.blog-entries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--muted);
}

.no-entries {
    text-align: center;
    padding: 4rem 0;
}

.no-entries h2 {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.no-entries p {
    color: var(--muted);
}

/* ========================================
   Blog Entry Card
   ======================================== */
.blog-entry-card {
    position: relative;
    padding: 2rem;
    border: 1px solid var(--border);
    background: transparent;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-entry-card:hover {
    border-color: var(--accent);
    background: rgba(74, 158, 255, 0.03);
    transform: translateY(-4px);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-number {
    font-family: var(--serif);
    font-size: 0.875rem;
    color: var(--accent);
}

.entry-date {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.entry-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.entry-excerpt {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.entry-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.entry-read-more {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.entry-read-more:hover {
    color: var(--accent-hover);
    transform: translateX(4px);
}

/* ========================================
   Modal Entry Meta
   ======================================== */
.entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.entry-meta-number {
    font-family: var(--serif);
    font-size: 0.875rem;
    color: var(--accent);
}

.entry-meta-date {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ========================================
   Entry Content Typography
   ======================================== */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--fg);
}

.entry-content h1 {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.entry-content h2 {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.entry-content h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 400;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
    color: rgba(245, 245, 240, 0.85);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    color: rgba(245, 245, 240, 0.85);
}

.entry-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.entry-content a:hover {
    color: var(--accent-hover);
}

.entry-content code {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.entry-content pre {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    position: relative;
}

.entry-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.entry-content blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--muted);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

/* ========================================
   Footer - Blog Specific
   ======================================== */
.footer-back {
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-back:hover {
    color: var(--accent);
}

/* ========================================
   Table of Contents (Modal)
   ======================================== */
.table-of-contents {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.table-of-contents h3 {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 1rem 0;
    color: var(--fg);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-item-sub {
    margin-left: 1rem;
    font-size: 0.9rem;
}

.toc-item a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc-item a:hover {
    color: var(--accent);
}

/* ========================================
   Code Copy Button
   ======================================== */
.code-copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

pre:hover .code-copy-button {
    opacity: 1;
}

.code-copy-button:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* External Link Indicator */
.external-link::after {
    content: ' \2197';
    font-size: 0.8em;
    opacity: 0.7;
}

/* ========================================
   Animations
   ======================================== */
.blog-entry-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease, background 0.4s ease;
}

.blog-entry-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .blog-hero, .blog-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .blog-entries {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding-top: 8rem;
    }

    .blog-entries {
        grid-template-columns: 1fr;
    }

    .code-copy-button {
        opacity: 1;
    }
}

/* ========================================
   Entry Modal
   ======================================== */
.entry-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.entry-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 4rem;
    position: relative;
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Make read-more button look like a link */
button.entry-read-more {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
