/* blog.css - Minimal flowing blog style */
@import url('./global.css');

:root {
    --bg: #1a1a1a;
    --text: #dcddde;
    --text-strong: #f7f3eb;
    --text-soft: rgba(255, 255, 255, 0.82);
    --text-faint: rgba(255, 255, 255, 0.5);
    --text-faint2: rgba(255, 255, 255, 0.4);
    --text-faint3: rgba(255, 255, 255, 0.3);
    --accent: #b0e3ec;
    --accent2: rgba(196, 181, 253, 0.9);
    --border: rgba(255, 255, 255, 0.1);
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.2);
    --diag-pos: #8fb3c9;
    --diag-neg: #d3a17e;
    --diag-you: #93c2a3;
}

[data-theme="light"] {
    --bg: #faf7f2;
    --text: #2e2b26;
    --text-strong: #1a1a1a;
    --text-soft: rgba(30, 27, 23, 0.85);
    --text-faint: rgba(30, 27, 23, 0.55);
    --text-faint2: rgba(30, 27, 23, 0.45);
    --text-faint3: rgba(30, 27, 23, 0.38);
    --accent: #0e7c8f;
    --accent2: #6d4fd1;
    --border: rgba(30, 27, 23, 0.12);
    --border-soft: rgba(30, 27, 23, 0.08);
    --shadow: rgba(0, 0, 0, 0.06);
    --diag-pos: #5c7e99;
    --diag-neg: #b8724f;
    --diag-you: #5f8f6e;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Blog Container */
.blog-container {
    max-width: 750px;
    width: 90%;
    margin: 0 auto;
    padding: 2rem 0 6rem;
}

.blog-header {
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.blog-header h1 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--accent2);
    margin-bottom: 0.25rem;
}

.blog-header p {
    font-size: 1rem;
    color: var(--text-faint);
    margin: 0;
}

/* Blog Entry - No boxes, just flow */
.blog-entry {
    margin-bottom: 3rem;
}

/* Currently Section */
.currently-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.currently-heading {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--accent);
    margin: 0;
    text-shadow: 0 0 15px rgba(176, 227, 236, 0.25);
}

.currently-text {
    font-size: 1.05rem;
    color: var(--text-soft);
    margin: 0;
}

.entry-date {
    font-size: 1.15rem;
    color: var(--accent2);
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content {
    font-size: 1.12rem;
    line-height: 1.75;
    color: var(--text-soft);
}

.entry-content p {
    margin-bottom: 0.75rem;
}

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

/* Text formatting */
.entry-content strong {
    color: var(--text-strong);
    font-weight: 600;
}

.entry-content em {
    color: var(--text-strong);
}

.entry-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: var(--text-strong);
}

/* Centered display math */
.entry-content .katex-display {
    margin: 1.75rem auto;
    overflow-x: auto;
    overflow-y: hidden;
    text-align: center;
}

.entry-content .katex-display > .katex {
    display: inline-block;
    text-align: initial;
}

/* Images in blog */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem auto;
    display: block;
}

/* Divider between entries */
.blog-entry:not(:last-child)::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--border);
    margin-top: 2.5rem;
}

/* Loading State */
.loading {
    color: var(--text-faint);
    padding: 2rem 0;
}

/* Empty State */
.empty-state {
    color: var(--text-faint);
    padding: 2rem 0;
}

.empty-state h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    color: var(--accent);
}

/* Last Updated */
.last-updated {
    font-size: 0.85rem;
    color: var(--text-faint3);
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-soft);
}

/* Image Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Navbar Theme */
.navbar {
    background-color: var(--bg);
    box-shadow: 0 2px 10px var(--shadow);
}

.nav-link {
    color: var(--text-strong);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link.active {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-container {
        width: 92%;
        padding: 1.5rem 0 4rem;
    }

    .blog-header h1 {
        font-size: 1.75rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    .blog-entry {
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.5rem;
    }

    .entry-date {
        font-size: 1rem;
    }

    .entry-content {
        font-size: 0.95rem;
        line-height: 1.65;
    }
}