body {
    min-height: 100vh;
}

.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wp-site-blocks > main.wp-block-group {
    flex: 1;
}

/* Sticky header */
header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Sticky category nav */
.category-nav {
    position: sticky;
    top: 64px;
    z-index: 99;
}

/* Navigation */
.wp-block-navigation-item__content {
    padding: 8px 14px !important;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.wp-block-navigation-item__content:hover {
    background: var(--wp--preset--color--bg-tertiary) !important;
    text-decoration: none !important;
}

.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
    background: var(--wp--preset--color--bg-tertiary);
    color: var(--wp--preset--color--text-primary);
}

.wp-block-navigation__submenu-icon {
    display: none;
}

/* Specifiers nav */
.specifiers-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.specifiers-nav-btn {
    background: transparent;
    border: none;
    color: var(--wp--preset--color--text-primary, #e6edf3);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.specifiers-nav-btn:hover {
    background: var(--wp--preset--color--bg-tertiary, #21262d) !important;
}

.specifiers-nav-btn.active {
    background: var(--wp--preset--color--bg-tertiary, #21262d);
}



/* Post cards in query loop */
.wp-block-post-template .wp-block-group {
    transition: border-color 0.15s;
}

.wp-block-post-template .wp-block-group:hover {
    border-color: #58a6ff !important;
}

/* Rating */
.post-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 6px 12px;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    user-select: none;
}

.post-rating:hover,
.post-rating.is-rated {
    border-color: #8b949e;
    background: #161b22;
}

.rating-star {
    font-size: 1.25rem;
    line-height: 1;
    color: #484f58;
    transition: color 0.15s;
}

.post-rating.is-rated .rating-star,
.post-rating:hover .rating-star {
    color: #d29922;
}

.rating-info {
    font-size: 0.8125rem;
    color: #8b949e;
    line-height: 1;
}

.rating-count {
    font-weight: 600;
}

.rating-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #8b949e;
}

.rating-count-badge:first-child {
    color: #d29922;
}

/* Featured image */
.post-featured-image img {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

/* About README (markdown style) */
.about-readme {
    line-height: 1.7;
    font-size: 1rem;
}

.about-readme img {
    max-width: 100%;
    border-radius: 6px;
    margin: 12px 0;
}

.about-readme h1,
.about-readme h2,
.about-readme h3,
.about-readme h4 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--wp--preset--color--border-muted, #21262d);
    padding-bottom: 8px;
}

.about-readme h1 { font-size: 1.75rem; }
.about-readme h2 { font-size: 1.5rem; }
.about-readme h3 { font-size: 1.25rem; }

.about-readme p {
    margin-bottom: 14px;
    color: var(--wp--preset--color--text-secondary);
}

.about-readme ul,
.about-readme ol {
    margin-bottom: 14px;
    padding-left: 24px;
    color: var(--wp--preset--color--text-secondary);
}

.about-readme li {
    margin-bottom: 4px;
}

.about-readme table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.about-readme th,
.about-readme td {
    border: 1px solid var(--wp--preset--color--border-default);
    padding: 8px 14px;
    text-align: left;
}

.about-readme th {
    background: var(--wp--preset--color--bg-tertiary);
    font-weight: 600;
}

.about-readme a {
    color: var(--wp--preset--color--text-link);
}

.about-readme hr {
    border: none;
    border-top: 1px solid var(--wp--preset--color--border-muted, #21262d);
    margin: 24px 0;
}

.about-readme code {
    font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
    font-size: 0.875rem;
    background: var(--wp--preset--color--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
}

.about-readme pre code {
    background: none;
    padding: 0;
}

/* Header search */
.header-search {
    display: flex;
    align-items: center;
    position: relative;
}
.header-search-input {
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    font-size: 0.875rem;
    padding: 6px 10px 6px 32px;
    width: 0;
    min-width: 0;
    transition: width 0.2s, border-color 0.15s, padding 0.2s;
    box-sizing: border-box;
}
.header-search-input::placeholder {
    color: #484f58;
}
.header-search-input:focus {
    width: 200px;
    border-color: #58a6ff;
    outline: none;
    padding: 6px 10px 6px 32px;
}
.header-search-button {
    position: absolute;
    left: 6px;
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #8b949e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    z-index: 1;
}
.header-search-button:hover {
    color: #e6edf3;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.8125rem;
    color: #8b949e;
    margin-bottom: 16px;
    padding: 8px 0;
}
.breadcrumbs a {
    color: #58a6ff;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs .breadcrumbs-sep {
    margin: 0 6px;
    color: #484f58;
}
.breadcrumbs span:last-child {
    color: #e6edf3;
}

/* Highlight.js tweaks */
pre code.hljs {
    background: #161b22 !important;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px !important;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* About page responsive */
@media (max-width: 768px) {
    .about-profile .wp-block-columns {
        flex-direction: column !important;
    }

    .about-profile .wp-block-column:first-child {
        flex-basis: 100% !important;
        text-align: center;
    }

    .about-profile .wp-block-column:first-child .wp-block-social-links {
        justify-content: center;
    }

    .about-profile .wp-block-column:first-child .wp-block-image img {
        width: 120px !important;
        height: 120px !important;
    }
}
