/* ─── Curated Canvas — Custom CSS ─────────────────────────────────────────── */

/* Reading Progress Bar */
#reading-progress {
    background: var(--color-primary-container, #ffd600);
    height: 2px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    transition: width 0.1s linear;
}

/* Prose typography overrides */
.prose { max-width: none; }
.prose h2, .prose h3, .prose h4 {
    font-family: inherit;
    letter-spacing: -0.02em;
}
.prose img {
    border-radius: 0.5rem;
}
.prose blockquote {
    border-left: 3px solid #ffd600;
    background: #f6f3f2;
    padding: 1rem 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: normal;
    color: #4d4632;
}

/* Dark Mode */
.dark body {
    background-color: #1c1b1b;
    color: #f3f0ef;
}
.dark .prose blockquote {
    background: #2a2929;
    color: #c8c6c6;
}

/* TOC Sidebar */
#toc-nav a {
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: #4d4632;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
    line-height: 1.5;
}
#toc-nav a:hover,
#toc-nav a.active {
    color: #705d00;
    background: #f6f3f2;
}
.dark #toc-nav a { color: #c8c6c6; }
.dark #toc-nav a:hover,
.dark #toc-nav a.active { background: #2a2929; color: #ffd600; }

/* TOC h3 indent */
#toc-nav a[data-level="3"] { padding-left: 1.25rem; }

/* WordPress pagination */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.25rem;
    color: #4d4632;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}
.page-numbers:hover { background: #f6f3f2; }
.page-numbers.current {
    background: #ffd600;
    color: #221b00;
    font-weight: 700;
}

/* Search form */
.search-form { display: flex; gap: 0.75rem; }
.search-field {
    flex: 1;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(208, 198, 171, 0.2);
    background: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}
.search-field:focus {
    border-color: #705d00;
    box-shadow: 0 0 0 2px rgba(112, 93, 0, 0.15);
}
.search-submit {
    padding: 1rem 1.5rem;
    background: #ffd600;
    color: #221b00;
    font-weight: 700;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}
.search-submit:hover { background: #e9c400; }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #d0c6ab;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: #7f775f; }

/* Selection */
::selection {
    background: #ffd600;
    color: #221b00;
}

/* Image loading skeleton */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}
img[loading="lazy"].loaded { opacity: 1; }

/* Mobile menu transitions */
#mobile-menu { transition: all 0.3s ease; }

/* WordPress comment form */
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(208, 198, 171, 0.3);
    background: #f6f3f2;
    margin-top: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #705d00;
}
.comment-form .submit {
    background: #ffd600;
    color: #221b00;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background 0.2s;
}
.comment-form .submit:hover { background: #e9c400; }

/* Tags in posts */
.tags-links a {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #e5e2e1;
    color: #4d4632;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s;
    margin: 0.2rem;
}
.tags-links a:hover { background: #ffd600; color: #221b00; }

/* Responsive adjustments */
@media (max-width: 768px) {
    #toc-sidebar { display: none; }
}
