/* Reset & base variables */
:root {
    --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --max-width: 680px;
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-link: #0000ee;
    --color-link-hover: #008fee;
    --color-nav: #333333;
    --color-nav-hover: #000000;
    --color-border: #eaeaea;
    --spacing: 1.5rem;
    --font-size: 16px;
}

html {
    font-size: var(--font-size);
}

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

a {
    color: var(--color-link);
}

a:visited {
    color: var(--color-link);
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    padding: 0 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* MAIN CONTAINER */
#site-wrapper {
    max-width: var(--max-width);
    margin: 1rem auto;
    padding: 0;
}

/* HEADER */
#site-header {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

#site-identity {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#site-logo-wrapper {
    margin-bottom: auto;
}
#site-logo {
    max-width: 120px;
    max-height: 80px;
    height: auto;
    width: auto;
    border-radius: .6rem;
}

#site-title {
    font-weight: 600;
}
#site-title a {
    text-decoration: none;
    color: var(--color-text);
}
#site-title a:hover {
    text-decoration: underline;
}

#site-slogan {
    color: #666;
    font-size: 0.95rem;
    margin-top: -0.2rem;
}


/* NAVIGATION */
#site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
}
#site-nav a {
    color: var(--color-nav);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.2rem;
}
#site-nav a:hover {
    border-bottom-color: var(--color-nav-hover);
}
#site-nav a[aria-current="page"] {
    border-bottom-color: var(--color-text);
    font-weight: 500;
}

/* social links */

#social-header {
    transform: none;
    margin-bottom: 1rem;
}

#social-footer {
    transform: none;
    justify-content: center;
    margin-bottom: 1rem;
}

#social-footer.site-social {
    width: auto;
}

.site-social {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 1.5rem;
}

.site-social a.social {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom-style: dotted;
}
.site-social a.social:hover {
    color: var(--color-text);
    border-bottom-color: var(--color-text);
}
.site-social a.rss {
    color: #c97400;
}
.site-social a.rss:hover {
    color: #a05d00;
}

/* MAIN CONTENT */
#site-main {
    min-height: 60vh;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* POST LIST (HOMEPAGE) */
.list-heading {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
}
.site-description {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 2rem;
}
.category-description {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 2rem;
}
.post-item {
    margin-bottom: 2.5rem;
}
.post-item-title {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}
.post-item-title a {
    color: var(--color-text);
    text-decoration: none;
}
.post-item-title a:hover {
    text-decoration: underline;
}
.post-item-meta {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-bottom: 0.5rem;
}
.post-item-description {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}
.post-item-excerpt {
    color: #444;
}
.post-item-readmore {
    margin-top: 0.6rem;
}
.post-item-readmore a {
    font-size: 0.9rem;
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
}
.post-item-readmore a:hover {
    border-bottom-color: var(--color-text);
}

/* SINGLE POST / PAGE */
#post-title, #page-title {
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
#post-meta {
    font-size: 0.85rem;
    color: #666;
    display: block;
}

#page-category {
    font-size: 0.85rem;
}

.page-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
    font-style: italic;
}
.page-cover-image {
    margin-bottom: 1.5rem;
}
.page-cover-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

#post-content, #page-content {
    font-size: 1.05rem;
    margin-top: 1.5rem;
}
#post-content a, #page-content a {
    color: var(--color-link);
    text-decoration: underline;
}
#post-content a:hover, #page-content a:hover {
    color: var(--color-link-hover);
}
#post-content h3, #page-content h3 { margin-top: 1.5rem; }
#post-content p, #page-content p { margin-bottom: 1.2rem; }
#post-content img, #page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
#post-content blockquote, #page-content blockquote {
    border-left: 4px solid var(--color-border);
    padding-left: 1.2rem;
    font-style: italic;
    color: #555;
}

#page-tags {
    margin-top: 2rem;
}

#page-tags span {
    margin-right: .6rem;
}

/*TAXONOMIES */
.taxonomy-tag + .taxonomy-tag {
    margin-left: .6rem;
}
.taxonomy-badge {
    color: var(--color-link);
    text-decoration: none;
}
.taxonomy-badge:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* PAGINATION */
#pagination {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
}
.pagination-prev,
.pagination-next {
    color: var(--color-link);
    text-decoration: none;
    font-size: 0.95rem;
}
.pagination-prev:hover,
.pagination-next:hover {
    text-decoration: underline;
}

/* FOOTER */
#site-footer {
    display: flex;
    justify-content: center;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    font-size: 0.90rem;
    text-align: center; 
}

/* Footer Links */

#footer-links {
    margin-bottom: 1rem;
    text-align: center;
}

#footer-links .plugin {
    margin-bottom: 1rem;
}

#footer-links .plugin:last-child {
    margin-bottom: 0;
}

#footer-links h2,
#footer-links .plugin-label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#footer-links.hide-labels h2,
#footer-links.hide-labels .plugin-label {
    display: none;
}

#footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#footer-links ul li {
    margin-bottom: 0.35rem;
}

#footer-links ul li a {
    text-decoration: none;
}

/* SKIP LINK (Accessibility) */
#skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
}
#skip-link:focus {
    top: 0;
}

/* UTILITY */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* POST ACTIONS */
#post-actions {
    display: flex;
    justify-content: space-evenly;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}
.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.96rem;
    font-family: inherit;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    transition: background 0.15s, border-color 0.15s;
}
.post-action-btn:hover {
    background: var(--color-border);
}
.reply-email-btn {
    transform: none;
}

/* FLOATING DASHBOARD BUTTON */
#dashboard-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--color-border);
    padding-top: 5px;
    color: var(--color-text);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
#dashboard-fab:hover {
    opacity: 1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    color: var(--color-text);
}

/* FLOATING EDIT BUTTON (above dashboard) */
#edit-fab {
    position: fixed;
    bottom: 4.5rem;
    right: 1.5rem;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--color-border);
    padding-top: 5px;
    color: var(--color-text);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
#edit-fab:hover {
    opacity: 1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    color: var(--color-text);
}

/* ───────────────────────────────────────────────────
   DARK THEME
   Overrides CSS variables + hardcoded colors.
   Activated via <html data-theme="dark">
   ─────────────────────────────────────────────────── */
[data-theme="dark"] {
    --color-bg: #1a1a2e;
    --color-text: #e0e0e0;
    --color-link: #7eb8ff;
    --color-link-hover: #a0d0ff;
    --color-border: #2d2d50;
}

[data-theme="dark"] body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

[data-theme="dark"] #site-title a {
    color: var(--color-text);
}

[data-theme="dark"] #site-slogan {
    color: #999;
}

[data-theme="dark"] #site-description {
    color: #aaa;
}

[data-theme="dark"] .list-heading {
    color: var(--color-text);
}

[data-theme="dark"] .site-description {
    color: #aaa;
}

[data-theme="dark"] .category-description {
    color: #aaa;
}

[data-theme="dark"] #site-nav a {
    color: var(--color-link);
}
[data-theme="dark"] #site-nav a:hover,
[data-theme="dark"] #site-nav a[aria-current="page"] {
    border-bottom-color: var(--color-link);
    color: var(--color-link-hover);
}

[data-theme="dark"] .nav-separator {
    background: var(--color-border);
}
[data-theme="dark"] #site-nav a.nav-social {
    color: #999;
}
[data-theme="dark"] .site-social a.social {
    color: #999;
}
[data-theme="dark"] .site-social a.social:hover {
    color: var(--color-text);
}
[data-theme="dark"] .site-social a.rss {
    color: #c97400;
}
[data-theme="dark"] .site-social a.rss:hover {
    color: #a05d00;
}
[data-theme="dark"] #site-nav a.nav-social:hover {
    color: var(--color-text);
}

[data-theme="dark"] .post-item-title a {
    color: var(--color-text);
}
[data-theme="dark"] .post-item-meta {
    color: #aaa;
}
[data-theme="dark"] .post-item-excerpt {
    color: #bbb;
}
[data-theme="dark"] .post-item-description {
    color: #aaa;
}

[data-theme="dark"] .post-item-readmore a {
    color: var(--color-link);
    border-bottom-color: var(--color-border);
}
[data-theme="dark"] .post-item-readmore a:hover {
    border-bottom-color: var(--color-link);
}

[data-theme="dark"] #post-title,
[data-theme="dark"] #page-title {
    color: var(--color-text);
}
[data-theme="dark"] #post-meta {
    color: #aaa;
}
[data-theme="dark"] .page-description {
    color: #aaa;
}

[data-theme="dark"] .taxonomy-badge {
    color: var(--color-link);
}
[data-theme="dark"] .taxonomy-badge:hover {
    color: var(--color-link-hover);
}

[data-theme="dark"] #post-content,
[data-theme="dark"] #page-content {
    color: var(--color-text);
}
[data-theme="dark"] #post-content blockquote,
[data-theme="dark"] #page-content blockquote {
    border-left-color: var(--color-border);
    color: #aaa;
}

[data-theme="dark"] #pagination a,
[data-theme="dark"] .pagination-prev,
[data-theme="dark"] .pagination-next {
    color: var(--color-link);
}

[data-theme="dark"] #site-footer {
    border-top-color: var(--color-border);
}

[data-theme="dark"] #skip-link {
    background: var(--color-link);
    color: #1a1a2e;
}

/* ───────────────────────────────────────────────────
   DARK THEME — Comments plugin
   ─────────────────────────────────────────────────── */

[data-theme="dark"] .bludit-comments {
    border-top-color: var(--color-border);
}

[data-theme="dark"] .bludit-comments h3 {
    color: var(--color-text);
}

[data-theme="dark"] .bludit-comments-count {
    color: #888;
}

[data-theme="dark"] .bludit-comments-flash {
    background: #1a2a3a;
    border-color: #2a4a6a;
    color: #8eb8e0;
}

[data-theme="dark"] .bludit-comments-empty,
[data-theme="dark"] .bludit-comments-closed {
    color: #999;
}

[data-theme="dark"] .bludit-comment {
    border-bottom-color: var(--color-border);
}

[data-theme="dark"] .bludit-comment-author strong {
    color: var(--color-text);
}

[data-theme="dark"] .bludit-comment-date {
    color: #777;
}

[data-theme="dark"] .bludit-comment-badge {
    background: #444;
    color: #ddd;
}

[data-theme="dark"] .bludit-comment-body {
    color: var(--color-text);
}

[data-theme="dark"] .bludit-comment-body a {
    color: var(--color-link);
}

/* ── Comments form ── */

[data-theme="dark"] .bludit-comment-form {
    background: #1e1e36;
    border-color: var(--color-border);
}

[data-theme="dark"] .bludit-comment-form h4 {
    color: var(--color-text);
}

[data-theme="dark"] .bludit-comment-form-logged {
    color: #999;
}

[data-theme="dark"] .bludit-comment-form-row label {
    color: #bbb;
}

[data-theme="dark"] .bludit-comment-form-row input,
[data-theme="dark"] .bludit-comment-form-row textarea {
    background: #121224;
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .bludit-comment-form-row input:focus,
[data-theme="dark"] .bludit-comment-form-row textarea:focus {
    border-color: var(--color-link);
    outline: none;
}

[data-theme="dark"] .bludit-comment-form-row small {
    color: #777;
}

[data-theme="dark"] .bludit-comment-form-actions button {
    background: var(--color-link);
    color: #1a1a2e;
}

[data-theme="dark"] .bludit-comment-form-actions button:hover {
    background: var(--color-link-hover);
}

/* ── Paginator ── */

[data-theme="dark"] .bludit-comments-paginator li a,
[data-theme="dark"] .bludit-comments-paginator li span {
    border-color: var(--color-border);
    color: var(--color-link);
    background: transparent;
}

[data-theme="dark"] .bludit-comments-paginator li.active span {
    background: var(--color-link);
    border-color: var(--color-link);
    color: #1a1a2e;
}

[data-theme="dark"] .bludit-comments-paginator li a:hover {
    background: #252545;
}

/* ── Edit this page button ── */

[data-theme="dark"] #edit-fab {
    background: #2a2a48;
    border-color: var(--color-border);
    color: var(--color-text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
[data-theme="dark"] #edit-fab:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.55);
    color: var(--color-text);
}

/* ── Floating dashboard button ── */

[data-theme="dark"] #dashboard-fab {
    background: #2a2a48;
    border-color: var(--color-border);
    color: var(--color-text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
[data-theme="dark"] #dashboard-fab:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.55);
    color: var(--color-text);
}