/*
Theme Name: BDHhub Microfeed
Theme URI: https://bdhhub.com/
Author: Brian D. Hawkins
Description: A minimal, single-author microblog theme for BDHhub.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: bdhhub-microfeed
*/

:root {
    --bdhhub-bg: #ffffff;
    --bdhhub-text: #151515;
    --bdhhub-muted: #767676;
    --bdhhub-line: #e3e3e3;
    --bdhhub-content-max: 1200px;
    --bdhhub-reading-max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bdhhub-bg);
    color: var(--bdhhub-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; }
img, video, iframe { max-width: 100%; }

.bdhhub-site-header {
    position: relative;
    width: 100%;
    padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
    text-align: center;
}

.bdhhub-brand {
    display: inline-block;
    line-height: 0;
}

.bdhhub-brand img {
    display: block;
    width: min(92vw, 720px);
    height: auto;
    margin: 0 auto;
}

.bdhhub-brand-text {
    display: inline-block;
    text-decoration: none;
    font-size: clamp(2.4rem, 7vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.055em;
}

.bdhhub-tagline {
    margin: .35rem 0 0;
    color: var(--bdhhub-muted);
    font-size: clamp(.95rem, 2vw, 1.2rem);
    font-style: italic;
}

.bdhhub-compose-link {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 100;
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border: 1px solid #c8c8c8;
    background: rgba(255,255,255,.94);
    color: #222;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.bdhhub-main { width: 100%; }
.bdhhub-feed { width: 100%; }

.bdhhub-post {
    width: 100%;
    margin: 0;
    padding: clamp(2.25rem, 6vw, 5.25rem) clamp(1rem, 5vw, 4rem);
}

.bdhhub-post + .bdhhub-post {
    border-top: 1px solid var(--bdhhub-line);
}

.bdhhub-post-inner {
    width: 100%;
    max-width: var(--bdhhub-content-max);
    margin: 0 auto;
}

.bdhhub-post-title {
    width: 100%;
    max-width: var(--bdhhub-reading-max);
    margin: 0 auto clamp(1.25rem, 3vw, 2rem);
    font-size: clamp(1.65rem, 4vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
    font-weight: 760;
}

.bdhhub-post-title a {
    text-decoration: none;
}

.bdhhub-post-title a:hover,
.bdhhub-post-title a:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: .08em;
    text-underline-offset: .16em;
}

.bdhhub-featured-image,
.bdhhub-embed {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto clamp(1.4rem, 3vw, 2.25rem);
    text-align: center;
}

.bdhhub-featured-image img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: none;
    height: auto;
    margin: 0 auto;
}

.bdhhub-embed iframe,
.bdhhub-embed video,
.bdhhub-embed audio {
    width: 100%;
}

.bdhhub-embed iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}

.bdhhub-post-content {
    width: 100%;
    max-width: var(--bdhhub-reading-max);
    margin: 0 auto;
    overflow-wrap: anywhere;
}

.bdhhub-post-content > :first-child { margin-top: 0; }
.bdhhub-post-content > :last-child { margin-bottom: 0; }
.bdhhub-post-content p { margin: 0 0 1.15em; }
.bdhhub-post-content ul,
.bdhhub-post-content ol { padding-left: 1.35em; }
.bdhhub-post-content a { text-underline-offset: .16em; }

.bdhhub-single .bdhhub-post {
    padding-top: clamp(1.5rem, 4vw, 3.5rem);
}

.bdhhub-pagination {
    width: 100%;
    max-width: var(--bdhhub-content-max);
    margin: 0 auto;
    padding: 2rem clamp(1rem, 5vw, 4rem) 4rem;
    text-align: center;
}

.bdhhub-pagination a {
    display: inline-block;
    padding: .75rem 1rem;
    border: 1px solid var(--bdhhub-line);
    text-decoration: none;
}

.js .bdhhub-pagination { display: none; }

.bdhhub-load-sentinel {
    width: 1px;
    height: 1px;
    margin: 0 auto;
}

.bdhhub-empty,
.bdhhub-page-content,
.bdhhub-error {
    width: 100%;
    max-width: var(--bdhhub-reading-max);
    margin: 0 auto;
    padding: 3rem clamp(1rem, 5vw, 4rem) 5rem;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed !important;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    width: auto;
    height: auto;
    clip: auto;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #222;
}

@media (max-width: 640px) {
    body { font-size: 17px; }
    .bdhhub-site-header { padding-top: 1.5rem; }
    .bdhhub-brand img { width: min(94vw, 600px); }
}
