/*
Theme Name: RKB Journal
Theme URI: https://ravikiranbandla.com
Author: Ravi Kiran Bandla
Description: Minimal, typography-first journal theme with a right sidebar. Calm, serious, timeless.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rkb-journal
*/

/* =========
   Design tokens
   ========= */
:root {
    --bg: #FAFBFF;
    --text: #121212;
    --muted: #5F6368;
    --accent: #16324F;
    --border: rgba(28, 28, 28, 0.10);
    --card: rgba(255, 255, 255, 0.55);
    --max: 1120px;
    --content: 720px;
    --sidebar: 320px;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(28, 28, 28, 0.06);
    --font-body: 'Inter', sans-serif;
    --font-ui: 'Inter', sans-serif;
}

/* =========
   Base
   ========= */
* {
    box-sizing: border-box;
}

html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px; /* explicit base */
}

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

    a:hover {
        opacity: .75;
        text-decoration: none;
    }

img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

.container {
    width: min(var(--max), 100%);
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    background: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

    .skip-link:focus {
        left: 16px;
        z-index: 9999;
    }

/* =========
   Header
   ========= */
.site-header {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 20px; /* was 18px */
    letter-spacing: 1.5px;
    font-weight: 650;
}

    .site-title a {
        color: var(--text);
        text-decoration: none;
    }

.site-tagline {
    margin: 4px 0 0;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 13px; /* was 12.5px */
}

.nav {
    font-family: var(--font-ui);
    font-size: 14px; /* keep */
}

    .nav ul {
        list-style: none;
        display: flex;
        gap: 16px;
        margin: 0;
        padding: 0;
    }

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

        .nav a:hover {
            color: var(--accent);
            text-decoration: none;
        }

/* =========
   Layout + Panels
   ========= */
.main-wrap {
    padding: 28px 0 60px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr var(--sidebar);
    gap: 34px;
    align-items: start;
}

.content {
    min-width: 0;
}

.reading {
    max-width: var(--content);
}

.main {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.sidebar {
    background: #ffffff;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid var(--border); /* stronger than rgba(0,0,0,0.04) */
    position: sticky;
    top: 92px;
}

/* =========
   Hero
   ========= */
.hero {
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

    .hero h1 {
        font-size: 36px; /* was 38px */
        font-weight: 700;
        letter-spacing: -0.8px;
        line-height: 1.15;
    }

    .hero p {
        margin: 0 0 10px;
        color: var(--text);
        opacity: .92;
    }

    .hero .note {
        margin-top: 10px;
        color: var(--muted);
        font-family: var(--font-ui);
        font-size: 13px; /* keep */
    }

.hero-profile {
    text-align: center;
}

    .hero-profile img {
        width: 100%;
        max-width: 360px;
        height: auto;
        border-radius: 10px;
        border: 1px solid var(--border);
    }

    .hero-profile .name {
        margin: 10px 0 0;
        font-family: var(--font-ui);
        font-weight: 650;
        font-size: 15px; /* was 14px */
    }

    .hero-profile .role {
        margin: 2px 0 0;
        font-family: var(--font-ui);
        font-size: 13px; /* was 12.5px */
        color: var(--muted);
    }

/* =========
   Posts list
   ========= */
.section-title {
    margin: 26px 0 12px;
    font-family: var(--font-ui);
    font-size: 12px; /* was 13px */
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.content .section-title {
    margin-bottom: 10px;
}

    .content .section-title:after {
        content: "";
        display: block;
        border-top: 1px solid rgba(0,0,0,0.15);
        margin-top: 10px;
    }


.post-item {
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

    .post-item:first-of-type {
        border-top: none;
    }

    .post-item h2 {
        margin: 0 0 6px;
        font-size: 18px; /* was 16px */
        line-height: 1.3;
    }

.meta {
    font-family: var(--font-ui);
    font-size: 13px; /* was 12.5px */
    color: var(--muted);
}

.excerpt {
    margin: 10px 0 0;
    color: rgba(28, 28, 28, 0.92);
}

/* =========
   Article (single/page)
   ========= */
.article h1 {
    margin: 0 0 8px;
    font-size: 26px; /* was 22px */
    line-height: 1.2;
}

.article .meta {
    margin-bottom: 18px;
}

.article .wp-post-image {
    margin: 14px 0 18px;
    border: 1px solid var(--border);
}

.article .entry-content {
    max-width: var(--content);
}

.entry-content p {
    margin: 0 0 8px;
}

.entry-content h2 {
    margin: 32px 0 10px;
    font-size: 20px; /* was 18px */
    line-height: 1.25;
}

.entry-content h3 {
    margin: 26px 0 8px;
    font-size: 16px; /* was 14px */
    line-height: 1.3;
}

.entry-content blockquote {
    margin: 22px 0;
    padding: 14px 16px;
    border-left: 3px solid var(--accent);
    background: rgba(255, 255, 255, 0.45);
    border-radius: 10px;
}

.entry-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95em; /* keep */
}

.entry-content pre {
    padding: 14px 16px;
    background: rgba(28, 28, 28, 0.06);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
}

/* =========
   Sidebar widgets (ALL sidebar related styles live here)
   ========= */

/* Widget base */
.widget {
    padding: 10px 0;
    background: transparent;
    border: none;
    margin-bottom: 20px;
}

.widget-title {
    margin: 0 0 10px;
    font-family: var(--font-ui);
    font-size: 13px; /* base (non-sidebar areas) */
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--muted);
}

.widget ul {
    margin: 0;
    padding-left: 18px;
    font-size: 14px; /* keep */
    line-height: 1.6;
}

.widget li {
    margin: 4px 0;
}

.widget a {
    color: var(--text);
}

    .widget a:hover {
        color: var(--accent);
        text-decoration: none;
    }

/* Sidebar-only rhythm + title tone */
.sidebar .widget {
    margin-bottom: 32px;
}

.sidebar .widget-title {
    font-size: 15px; /* was 16px */
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: normal;
    text-transform: none;
    color: var(--text);
}

/* Image widget spacing (WP media image widget) */
.widget_media_image {
    margin: 0 0 6px 0;
}

    .widget_media_image img {
        display: block;
        margin: 0 auto;
        max-width: 200px;
        width: 100%;
        border-radius: 12px;
    }

/* Author box */
.rkb-profile-meta {
    text-align: center;
}

.rkb-profile-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    margin: 10px 0 2px 0;
    color: var(--text);
}

.rkb-profile-title {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    color: var(--muted);
}

    .rkb-profile-title a {
        color: var(--muted);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .rkb-profile-title a:hover {
            color: var(--accent);
            text-decoration: underline;
        }

.rkb-profile-link {
    text-decoration: none;
    color: inherit;
}

    .rkb-profile-link:hover {
        opacity: 0.9;
    }
/* Announcement-style promo card */
/* Start here label */
.rkb-promo-label {
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 3px 0;
    text-align: center;
}

/* Announcement-style promo card */
.rkb-promo-box {
    background: #F2F9F9;
    border: 1px solid #D6EDEE;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .rkb-promo-box:hover {
        background: #EAF6F7;
        border-color: #CFE7E8;
    }

.rkb-promo-link {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .rkb-promo-link:hover {
        text-decoration: underline;
    }
/* Search (single definition used by WP search widget + your custom search) */
.search-form {
    display: flex;
    gap: 8px;
}

.search-field,
.rkb-search input[type="search"],
.rkb-search input[type="text"] {
    flex: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.65);
    font-family: var(--font-ui);
}

/* Sidebar lists (Categories + Archives etc.) */
.rkb-list {
    margin: 0;
    padding-left: 18px;
}

    .rkb-list li {
        margin-bottom: 6px;
    }

    .rkb-list a {
        text-decoration: none;
    }

        .rkb-list a:hover {
            text-decoration: underline;
        }

/* =========
   Seed Architecture Reading Path
   ========= */
.sa-reading-nav {
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.sa-reading-nav__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.2rem;
    font-size: 14px; /* was 0.9rem */
}

.sa-reading-nav__title {
    font-weight: 600;
    color: #111;
}

.sa-reading-nav__progress {
    color: #666;
}

.sa-reading-nav__buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sa-reading-nav__btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    text-decoration: none;
    font-size: 14px; /* was 0.9rem */
    transition: all 0.2s ease;
    color: #111;
    background: #f8f9fb;
}

    .sa-reading-nav__btn:hover {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
    }

.sa-reading-nav__overview {
    opacity: 0.75;
}

/* =========
   Footer
   ========= */
.site-footer {
    border-top: 1px solid var(--border);
    background: #F7F7F5;
    padding: 22px 0;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 13px; /* was 12.5px */
}

.footer-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========
   Responsive (all in one place)
   ========= */
@media (max-width: 980px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 740px) {
    .container {
        width: 100%;
        padding: 0 18px;
    }

    .grid {
        display: block;
    }

    .sidebar {
        margin-top: 18px;
    }
}

@media (max-width: 768px) {
    .sidebar .widget {
        margin-bottom: 24px;
    }

    .sidebar .widget-title {
        font-size: 15px; /* keep consistent on mobile */
        margin-bottom: 10px;
    }

    /* prevents iOS zoom-on-focus */
    .rkb-search input[type="search"],
    .rkb-search input[type="text"] {
        font-size: 16px;
    }

    .rkb-list {
        padding-left: 16px;
    }
}

@media (max-width: 640px) {
    .sa-reading-nav__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .sa-reading-nav__btn {
        text-align: center;
    }
}
/* Category boxes grid (under hero) */
.rkb-cat-grid-wrap {
    margin-top: 18px;
}

.rkb-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 720px) {
    .rkb-cat-grid {
        grid-template-columns: 1fr;
    }
}

/* Box styling */
.rkb-cat-box {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 18px;
    padding: 16px;
}

.rkb-cat-header {
    margin-bottom: 10px;
}

.rkb-cat-title {
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.rkb-cat-body {
    font-size: 14px;
    line-height: 1.5;
}

.rkb-cat-feature-title {
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 6px;
}

.rkb-cat-feature-excerpt {
    margin: 0 0 10px 0;
    opacity: 0.9;
}

/* Bullets */
.rkb-cat-bullets {
    margin: 0;
    padding-left: 18px;
}

    .rkb-cat-bullets li {
        margin: 6px 0;
    }

.rkb-cat-footer {
    margin-top: 14px;
    text-align: right;
}

.rkb-cat-more {
    font-size: 13px;
    font-weight: 400; /* remove bold */
    text-decoration: none;
    opacity: 0.75;
}

    .rkb-cat-more:hover {
        opacity: 1;
    }

/* Category intro: restore bullets */
.rkb-category-intro ul {
    list-style: disc;
    padding-left: 1.2em;
    margin: 0.6em 0 0;
}

.rkb-category-intro li {
    margin: 0.25em 0;
}

/* Seed Architecture featured line */
.rkb-featured-line {
    margin: 0 0 10px 0;
}

.rkb-featured-link {
    font-weight: 700;
    text-decoration: none;
}
.rkb-bullet-feature {
    margin-bottom: 10px;
}

.rkb-bullet-desc {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
}
.rkb-category-intro {
    margin: 8px 0 28px;
    padding: 0;
    border: none;
    background: none;
    font-size: 16px;
    line-height: 1.7;
}
.rkb-category-intro p:last-child {
     margin-bottom: 0;
 }

.rkb-category-heading {
    font-size: 22px;
    margin: 8px 0 8px;
    font-weight: 600;
}

.rkb-category-divider {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.15);
    margin: 0 0 18px;
}
.category .section-title {
    font-family: var(--font-serif); /* or your preferred font */
    font-size: 28px;
    letter-spacing: normal;
    text-transform: none;
    color: var(--accent);
}
.archive-description {
    margin: 10px 0 20px;
    max-width: 62ch;
    color: var(--text);
    opacity: 0.9;
    line-height: 1.6;
}

.sa-reading-nav {
    margin-top: 2.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(0,0,0,0.12);
    font-size: 0.95rem;
}

.sa-reading-nav__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    opacity: 0.85;
}

.sa-reading-nav__title {
    font-weight: 500;
}

.sa-reading-nav__progress {
    opacity: 0.7;
}

.sa-reading-nav__links {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.sa-reading-nav__link {
    text-decoration: none;
    line-height: 1.35;
}

    .sa-reading-nav__link:hover {
        text-decoration: underline;
    }

.sa-reading-nav__prev {
    justify-self: start;
    text-align: left;
}

.sa-reading-nav__overview {
    justify-self: center;
    text-align: center;
    opacity: 0.75;
}

.sa-reading-nav__next {
    justify-self: end;
    text-align: right;
}
.sa-reading-nav__prev,
.sa-reading-nav__next {
    max-width: 260px;
}
@media (max-width: 640px) {

    .sa-reading-nav__header {
        flex-direction: column;
        gap: 4px;
        font-size: 0.9rem;
    }

    .sa-reading-nav__links {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 8px;
    }

    .sa-reading-nav__prev,
    .sa-reading-nav__next,
    .sa-reading-nav__overview {
        justify-self: start;
        text-align: left;
    }

    .sa-reading-nav__overview {
        opacity: 0.8;
        font-size: 0.9rem;
    }
}
.sa-reading-nav__link {
    padding: 4px 0;
}
.sa-reading-nav__placeholder {
    visibility: hidden;
}