/*
Theme Name: Bibliotaph's Treasury Blog
Theme URI: https://your-author-website.com/
Author: Cian Kai (with Gemini)
Author URI: https://your-author-website.com/
Description: A blog theme to match the "Cian Kai" static author website. Designed to be used in a /blog/ subdirectory.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bibliotaphs-blog-theme
Tags: two-column, dark, custom-background, custom-menu, custom-colors, editor-style, block-editor-styles, blog
*/

/*--------------------------------------------------------------
1.0 - Base & Typography
(Identical to main static site)
--------------------------------------------------------------*/
html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0a; /* brand-dark */
    color: #d1d5db; /* brand-light */
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 17px;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.font-serif {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

h1, .h1 { font-size: 2.5rem; } /* 40px */
h2, .h2 { font-size: 2rem; }   /* 32px */
h3, .h3 { font-size: 1.5rem; } /* 24px */
h4, .h4 { font-size: 1.25rem; } /* 20px */

@media (min-width: 640px) {
    h1, .h1 { font-size: 3rem; } /* 48px */
    h2, .h2 { font-size: 2.5rem; } /* 40px */
}

p {
    margin-bottom: 1.5rem;
    color: #d1d5db; /* brand-light */
}

a {
    color: #d97706; /* brand-accent */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #b45309; /* brand-accent-dark */
}

blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #d97706; /* brand-accent */
    background-color: rgba(29, 29, 29, 0.5); /* Lighter version of brand-gray */
    font-style: italic;
    color: #9ca3af; /* gray-400 */
}

blockquote p {
    margin-bottom: 1rem;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Screen reader text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/*--------------------------------------------------------------
2.0 - Layout & Header/Footer
(Identical to main static site)
--------------------------------------------------------------*/
.container {
    width: 100%;
    max-width: 1024px; /* lg */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem; /* px-6 */
    padding-right: 1.5rem; /* px-6 */
}

.site-header {
    background-color: rgba(10, 10, 10, 0.8); /* brand-dark/80 */
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #374151; /* gray-700 */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem; /* h-16 */
}

.site-title a {
    font-size: 1.5rem; /* text-2xl */
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: #ffffff;
}
.site-title a:hover {
    color: #ffffff;
}

.site-footer {
    background-color: #0a0a0a; /* brand-dark */
    border-top: 1px solid #374151; /* gray-700 */
    margin-top: 5rem; /* mt-20 */
    padding-top: 2rem; /* py-8 */
    padding-bottom: 2rem; /* py-8 */
    text-align: center;
    color: #6b7280; /* gray-500 */
}

.site-footer p {
    color: #6b7280; /* gray-500 */
    margin: 0;
}

/*--------------------------------------------------------------
3.0 - Navigation (Desktop)
(Identical to main static site)
--------------------------------------------------------------*/
.main-navigation {
    display: none; /* Hidden on mobile */
}

@media (min-width: 768px) {
    .main-navigation {
        display: block;
    }
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 1rem; /* space-x-4 */
}

.main-navigation ul li {
    margin: 0;
    padding: 0;
}

.main-navigation ul a {
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    color: #d1d5db; /* text-gray-300 */
    padding: 0.5rem 0.75rem; /* px-3 py-2 */
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}

.main-navigation ul a:hover {
    color: #ffffff;
    border-bottom-color: #b45309; /* brand-accent-dark */
}

/* Class added by JS, or for current page item */
.main-navigation ul a.active-link,
.main-navigation .current-menu-item > a {
    color: #ffffff;
    border-bottom-color: #d97706; /* brand-accent */
}


/*--------------------------------------------------------------
4.0 - Mobile Navigation
(Identical to main static site)
--------------------------------------------------------------*/
.mobile-menu-button {
    display: flex; /* flex */
    padding: 0.5rem; /* p-2 */
    border-radius: 0.375rem; /* rounded-md */
    color: #9ca3af; /* text-gray-400 */
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-button {
        display: none; /* hidden md: */
    }
}

.mobile-menu-button:hover {
    color: #ffffff;
    background-color: #374151; /* hover:bg-gray-700 */
}

.mobile-menu-button svg {
    height: 1.5rem; /* h-6 */
    width: 1.5rem; /* w-6 */
}

#hamburger-icon-close {
    display: none; /* hidden */
}

.mobile-menu {
    display: none; /* hidden */
    padding: 0.5rem 0.75rem 0.75rem; /* px-2 pt-2 pb-3 sm:px-3 */
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none !important; /* md:hidden */
    }
}

.mobile-menu.open {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu a {
    display: block;
    color: #d1d5db; /* text-gray-300 */
    padding: 0.5rem 0.75rem; /* px-3 py-2 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 1rem; /* text-base */
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.mobile-menu a.active-link,
.mobile-menu .current-menu-item > a {
    color: #ffffff;
    border-bottom-color: #d97706; /* brand-accent */
}

/*--------------------------------------------------------------
5.0 - Blog & Content Area
(NEW for this theme)
--------------------------------------------------------------*/
.site-main {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* This is the main content area for posts, pages */
.page-content,
.blog-content {
    max-width: 896px; /* max-w-4xl */
    margin: 0 auto;
}

/* Page title (e.g., "Blog" on index.php) */
.page-title {
    font-size: 3rem; /* text-5xl */
    font-family: 'Merriweather', serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.025em; /* tracking-tight */
    margin-bottom: 3rem;
    border-bottom: 2px solid #d97706; /* brand-accent */
    padding-bottom: 1rem;
    display: inline-block;
}

/* Single post/page title */
.entry-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.entry-title a {
    color: #ffffff;
}
.entry-title a:hover {
    color: #d1d5db;
}

/* Post meta (date, author, etc) */
.entry-meta {
    font-size: 0.875rem;
    color: #9ca3af; /* gray-400 */
    margin-bottom: 2rem;
}
.entry-meta a {
    color: #9ca3af;
}
.entry-meta a:hover {
    color: #d97706;
}

/* Post item in a list (index.php) */
.post-list-item {
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid #374151; /* gray-700 */
}
.post-list-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.read-more-link {
    display: inline-block;
    font-weight: 700;
    color: #d97706;
    margin-top: 1rem;
}
.read-more-link:hover {
    color: #b45309;
}
.read-more-link::after {
    content: ' \2192'; /* Right arrow */
}

/* Single post content (single.php) */
.single-post-content .entry-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #374151; /* gray-700 */
    padding-bottom: 2rem;
}

.single-post-content .entry-content img {
    border-radius: 0.5rem; /* rounded-lg */
    max-width: 100%;
    height: auto;
}

/* Post navigation (Older/Newer posts) */
.post-navigation {
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-family: 'Merriweather', serif;
}

/* Comments */
.comments-area {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #374151; /* gray-700 */
}

.comments-title, .comment-reply-title {
    font-size: 2rem;
    font-family: 'Merriweather', serif;
    color: #ffffff;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-body {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #1e1e1e; /* brand-gray */
    border-radius: 0.5rem;
    border: 1px solid #374151; /* gray-800 */
}

.comment-author .fn {
    color: #d97706; /* brand-accent */
    font-style: normal;
    font-weight: 700;
}

.comment-meta {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.reply a {
    font-size: 0.875rem;
    font-weight: 700;
}

/* Comment Form */
.comment-form {
    background: #1e1e1e; /* brand-gray */
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #374151; /* gray-800 */
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #d1d5db;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem; /* rounded-md */
    background-color: #0a0a0a; /* brand-dark */
    border: 1px solid #4b5563; /* border-gray-700 */
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: 2px solid #d97706; /* focus:ring-2 focus:ring-brand-accent */
    border-color: #d97706;
}

.comment-form .form-submit input[type="submit"] {
    padding: 0.75rem 1.5rem; /* px-6 py-3 */
    border-radius: 0.375rem; /* rounded-md */
    background-color: #d97706; /* bg-brand-accent */
    color: #ffffff;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.comment-form .form-submit input[type="submit"]:hover {
    background-color: #b45309; /* hover:bg-brand-accent-dark */
}

/*--------------------------------------------------------------
6.0 - WordPress Block Editor Styles
--------------------------------------------------------------*/
/* (Identical to main static site) */
/* Color Palette Helpers */
.has-brand-accent-color { color: #d97706 !important; }
.has-brand-accent-background-color { background-color: #d97706 !important; }
.has-brand-light-color { color: #d1d5db !important; }
.has-brand-light-background-color { background-color: #d1d5db !important; }
.has-brand-gray-color { color: #1e1e1e !important; }
.has-brand-gray-background-color { background-color: #1e1e1e !important; }
.has-brand-dark-color { color: #0a0a0a !important; }
.has-brand-dark-background-color { background-color: #0a0a0a !important; }
.has-white-color { color: #ffffff !important; }
.has-white-background-color { background-color: #ffffff !important; }

/* Button styles */
.wp-block-button__link {
    background-color: #d97706; /* bg-brand-accent */
    color: #ffffff !important;
    font-weight: 500;
    border-radius: 0.375rem; /* rounded-md */
    padding: 0.75rem 1.5rem;
    transition: background-color 0.2s ease-in-out;
    text-decoration: none;
}

.wp-block-button__link:hover {
    background-color: #b45309; /* hover:bg-brand-accent-dark */
}
