/* ============================================================
   dbnz — Brand Overrides
   Layered on top of Casper. Do not edit screen.css for brand
   changes; use this file.
   ============================================================ */

/* 1. Variables
/* ---------------------------------------------------------- */

:root {
    --dbnz-bg:      #F5F5F3;
    --dbnz-text:    #0B0B0B;
    --dbnz-green:   #14333E;
    --dbnz-brown:   #6B4F3A;
    --dbnz-border:  #D8D8D5;
    --dbnz-meta:    #7A7A77;

    /* Override Casper variables */
    --color-darkgrey:       #0B0B0B;
    --color-midgrey:        #6B4F3A;
    --color-secondary-text: #7A7A77;
    --color-border:         #D8D8D5;
    --color-lightgrey:      #E8E8E6;
    --color-wash:           #EEEDE9;

    /* Mono stack */
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", Menlo, Courier, monospace;
}


/* 2. Base
/* ---------------------------------------------------------- */

body {
    background-color: var(--dbnz-bg);
    color: var(--dbnz-text);
}

::selection {
    background: rgba(20, 51, 62, 0.15);
    text-shadow: none;
}


/* 3. Site header / nav bar
/* ---------------------------------------------------------- */

.gh-head {
    background-color: var(--dbnz-bg) !important;
    color: var(--dbnz-text) !important;
    border-bottom: 1px solid var(--dbnz-border);
    height: 64px;
}

/* Remove the transparent overlay on cover pages */
:is(.home-template, .paged:not(.tag-template):not(.author-template)).has-cover .gh-head {
    position: static;
    background-color: var(--dbnz-bg) !important;
    color: var(--dbnz-text) !important;
}

.has-cover:not(.home-template) .gh-head {
    background-color: var(--dbnz-bg) !important;
    color: var(--dbnz-text) !important;
}

/* Logo: monospace wordmark style */
.gh-head-logo {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--dbnz-text) !important;
}

.gh-head-logo.no-image {
    margin-top: 0;
}

.gh-head-logo img {
    max-height: 28px;
}

/* Nav links */
.gh-head-menu .nav {
    gap: 24px;
}

.gh-head-menu .nav a {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--dbnz-text);
    opacity: 0.45;
    transition: opacity 0.15s;
    line-height: 1.7;
}

.gh-head-menu .nav a:hover {
    opacity: 1;
}

/* Member / subscribe buttons */
.gh-head-button {
    background-color: var(--dbnz-green);
    color: #fff;
    font-size: 1.3rem;
    border-radius: 3px;
    padding: 8px 16px;
}

.gh-head-link {
    font-size: 1.3rem;
    color: var(--dbnz-meta);
}

/* Mobile open state */
.gh-head-open #gh-head .gh-head-actions {
    background-color: var(--dbnz-bg) !important;
}

.gh-head-open.has-cover #gh-head,
.gh-head-open.has-cover #gh-head .gh-head-actions {
    background-color: var(--dbnz-bg) !important;
}

#gh-head .nav a {
    color: var(--dbnz-text);
}

/* Burger lines */
.gh-burger::before,
.gh-burger::after {
    background-color: var(--dbnz-text);
}

/* Search icon */
.gh-icon-btn svg {
    fill: none;
    stroke: var(--dbnz-text);
}


/* 4. Homepage hero header
/* ---------------------------------------------------------- */

.site-header-content {
    padding-top: 52px;
    padding-bottom: 44px;
    background-color: var(--dbnz-bg) !important;
    color: var(--dbnz-text) !important;
}

/* Collapse huge min-height */
.has-cover .site-header-content {
    min-height: 0 !important;
    background-color: var(--dbnz-bg) !important;
    color: var(--dbnz-text) !important;
}

/* Keep cover image hidden unless explicitly set */
.site-header-cover {
    display: none;
}

/* Site title: monospace, refined */
.site-title {
    font-family: var(--font-mono) !important;
    font-size: 2.6rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em;
    color: var(--dbnz-text) !important;
}

.has-cover .site-title {
    color: var(--dbnz-text) !important;
}

@media (max-width: 767px) {
    .site-title {
        font-size: 2.0rem !important;
    }
}

/* Site description: small, warm muted color */
.site-description {
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--dbnz-brown) !important;
    letter-spacing: 0 !important;
}

:is(.site-logo, .site-title) + .site-description {
    max-width: 520px;
    margin-top: 6px;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--dbnz-brown) !important;
}

.has-cover .site-description,
.has-cover :is(.site-logo, .site-title) + .site-description {
    color: var(--dbnz-brown) !important;
}

@media (max-width: 767px) {
    .site-description {
        font-size: 1.4rem !important;
    }
    :is(.site-logo, .site-title) + .site-description {
        margin-top: 6px !important;
    }
}


/* 5. Post feed — clean single-column list
/* ---------------------------------------------------------- */

.post-feed {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    grid-template-columns: none !important;
    padding-top: 0;
    border-top: 1px solid var(--dbnz-border);
}

/* All cards: flat list rows */
.post-card {
    grid-column: unset !important;
    display: block !important;
    padding: 28px 0;
    border-top: none !important;
    border-bottom: 1px solid var(--dbnz-border);
    background: none;
}

/* Remove the oversized first-post and dynamic layouts */
@media (min-width: 1001px) {
    .post-card-large {
        grid-column: unset !important;
        display: block !important;
        grid-template-columns: none !important;
        grid-gap: 0 !important;
        border-top: none !important;
    }

    .post-card-large .post-card-image-link {
        grid-column: unset;
    }

    .post-card-large .post-card-content {
        grid-column: unset;
        max-width: 720px;
    }

    .post-card-large .post-card-title {
        font-size: 1.9rem;
        line-height: 1.3;
    }
}

/* Hide feature images in the feed */
.post-feed .post-card-image-link {
    display: none !important;
}

/* Tag label: monospace caps, green */
.post-card-tags {
    margin-bottom: 6px;
    color: var(--dbnz-green);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.post-card-primary-tag {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--dbnz-green);
}

/* Post title */
.post-card-title {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--dbnz-text);
}

.post-card-content-link:hover .post-card-title {
    color: var(--dbnz-green);
    opacity: 1;
}

/* Excerpt */
.post-card-excerpt {
    margin-top: 6px;
    font-size: 1.5rem;
    line-height: 1.55;
    color: var(--dbnz-meta);
    -webkit-line-clamp: 2;
}

/* Meta: monospace dates */
.post-card-meta {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--dbnz-meta);
    letter-spacing: 0.01em;
    gap: 8px;
}

.post-card-meta > * + *:not(script)::before {
    background-color: var(--dbnz-border);
}

/* Pagination */
.pagination {
    margin-top: 48px;
}

.pagination a {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--dbnz-green);
}

.pagination .page-number {
    color: var(--dbnz-meta);
    font-family: var(--font-mono);
    font-size: 1.2rem;
}


/* 6. Single post
/* ---------------------------------------------------------- */

.article-title {
    font-size: clamp(2.2rem, 3.8vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--dbnz-text);
}

.article-excerpt {
    font-size: 1.75rem;
    color: var(--dbnz-meta);
    line-height: 1.5;
    margin-top: 12px;
    font-weight: 400;
}

/* Tag above title */
.article-tag a {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--dbnz-green);
}

/* Author byline */
.article-byline-meta {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--dbnz-meta);
}

.article-byline-meta .author-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dbnz-text);
    font-family: inherit;
    margin-bottom: 4px;
}

.byline-meta-date,
.byline-reading-time {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--dbnz-meta);
}

.author-avatar {
    border-color: var(--dbnz-bg);
    background-color: var(--dbnz-border);
}

/* Article post content: sans-serif body */
.gh-content > blockquote:not([class]),
.gh-content > ol,
.gh-content > ul,
.gh-content > dl,
.gh-content > p {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    line-height: 1.75em;
    color: var(--dbnz-text);
}

@media (max-width: 650px) {
    .gh-content > blockquote:not([class]),
    .gh-content > ol,
    .gh-content > ul,
    .gh-content > dl,
    .gh-content > p {
        font-size: 1.65rem;
    }
}

/* Content headings */
.gh-content > [id] {
    color: var(--dbnz-text);
}

/* Content links: green */
.gh-content a {
    color: var(--dbnz-green);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(20, 51, 62, 0.4);
}

.gh-content a:hover {
    text-decoration-color: var(--dbnz-green);
}

/* Blockquote accent */
.gh-content > blockquote:not([class]) {
    color: var(--dbnz-meta);
    font-style: normal;
}

.gh-content > blockquote:not([class])::before {
    background: var(--dbnz-green);
    width: 2px;
}

/* Inline code */
.gh-content :not(pre) > code {
    font-family: var(--font-mono);
    background: #ECEAE6;
    border: 1px solid var(--dbnz-border);
    color: var(--dbnz-green);
    border-radius: 2px;
    font-size: 0.85em;
    padding: 0.15em 0.35em;
}

/* Code blocks */
.gh-content pre {
    background: #0F1A1E;
    color: #A8C5A0;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 1.35rem;
    line-height: 1.65em;
    box-shadow: none;
    border: none;
    padding: 20px 24px;
}

/* HR */
hr {
    border-top-color: var(--dbnz-border);
}

/* Tables */
.gh-content table:not(.gist table) th {
    background-color: #ECEAE6;
    color: var(--dbnz-text);
}

/* Captions */
figcaption {
    color: var(--dbnz-meta);
    font-size: 1.2rem;
}


/* 7. Subscribe CTA
/* ---------------------------------------------------------- */

.footer-cta {
    border-top: 1px solid var(--dbnz-border);
    padding-top: 48px;
}

.footer-cta-title {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 600;
    color: var(--dbnz-text);
}

.footer-cta-button {
    background: #fff;
    border-color: var(--dbnz-border);
    border-radius: 2px;
}

.footer-cta-button span {
    background: var(--dbnz-green);
    border-radius: 2px;
}


/* 8. Read-more section
/* ---------------------------------------------------------- */

.read-more-wrap {
    border-top: 1px solid var(--dbnz-border);
    margin-top: 48px;
}

.read-more {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.read-more .post-card {
    border-top: none;
    border-bottom: 1px solid var(--dbnz-border);
}

.read-more .post-card:nth-child(3) {
    display: block !important;
}

.read-more .post-card:nth-child(2) {
    display: block !important;
}

.read-more .post-card-tags {
    display: flex;
}

@media (max-width: 1000px) {
    .read-more .post-card:nth-child(3) {
        display: block !important;
    }
}


/* 9. Site footer
/* ---------------------------------------------------------- */

.site-footer {
    margin-top: max(8vmin, 40px) !important;
    padding-top: 28px !important;
    padding-bottom: 28px !important;
    color: var(--dbnz-meta) !important;
    background: var(--dbnz-bg) !important;
    border-top: 1px solid var(--dbnz-border);
}

.site-footer .inner {
    color: var(--dbnz-meta) !important;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
}

.site-footer .copyright a {
    color: var(--dbnz-text) !important;
    font-weight: 500;
}

.site-footer a {
    color: var(--dbnz-meta) !important;
}

.site-footer a:hover {
    color: var(--dbnz-text) !important;
    text-decoration: none;
}

.site-footer-nav li:not(:first-child) a:before {
    background: var(--dbnz-border) !important;
}

.gh-powered-by a {
    color: var(--dbnz-meta) !important;
    opacity: 0.5;
    font-size: 1.1rem;
}

@media (max-width: 767px) {
    .site-footer .inner {
        max-width: none;
        text-align: left;
        grid-template-columns: 1fr;
    }

    .site-footer .copyright,
    .site-footer .copyright a {
        color: var(--dbnz-text) !important;
        font-size: 1.2rem;
    }
}


/* 10. Tag / Author templates
/* ---------------------------------------------------------- */

.site-header-content.left-aligned .site-title {
    font-size: 2.2rem !important;
}

/* Tag description */
.tag-template .site-description,
.author-template .site-description {
    font-size: 1.5rem !important;
    color: var(--dbnz-meta) !important;
}


/* 11. Error pages
/* ---------------------------------------------------------- */

.error-code {
    color: var(--dbnz-text);
    letter-spacing: -0.03em;
}

.error-description {
    color: var(--dbnz-meta);
    font-size: 2rem;
    font-weight: 400;
}

.error-link {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--dbnz-green);
    text-decoration: underline;
}


/* 12. Dark mode adjustments (if enabled)
/* ---------------------------------------------------------- */

html.dark-mode body {
    background: #0D0F0C;
    color: rgba(245, 245, 243, 0.85);
}

html.dark-mode .gh-head {
    background-color: #0D0F0C !important;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .gh-head-logo,
html.dark-mode .gh-head-menu .nav a {
    color: rgba(245, 245, 243, 0.85) !important;
}

html.dark-mode .site-header-content {
    background-color: #0D0F0C !important;
    color: rgba(245, 245, 243, 0.85) !important;
}

html.dark-mode .site-title {
    color: rgba(245, 245, 243, 0.85) !important;
}

html.dark-mode .site-description,
html.dark-mode :is(.site-logo, .site-title) + .site-description {
    color: rgba(107, 79, 58, 0.8) !important;
}

html.dark-mode .post-feed {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark-mode .post-card {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark-mode .post-card-title {
    color: rgba(245, 245, 243, 0.9);
}

html.dark-mode .gh-content > blockquote:not([class]),
html.dark-mode .gh-content > ol,
html.dark-mode .gh-content > ul,
html.dark-mode .gh-content > dl,
html.dark-mode .gh-content > p {
    color: rgba(245, 245, 243, 0.8);
}

html.dark-mode .gh-content :not(pre) > code {
    background: rgba(20, 51, 62, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
    color: #88C0A0;
}

html.dark-mode .site-footer {
    background: #0D0F0C !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}


/* 13. Logo wordmark image
/* ---------------------------------------------------------- */

.dbnz-wordmark-img {
    height: 28px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.dbnz-wordmark-fallback {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--dbnz-text);
}

html.dark-mode .dbnz-wordmark-img {
    filter: invert(1);
}


/* 14. Homepage hero
/* ---------------------------------------------------------- */

.dbnz-hero {
    padding: 96px 0 80px;
}

.dbnz-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* The wordmark — pure text, monospace, anchoring presence */
.dbnz-hero-wordmark {
    font-family: var(--font-mono);
    font-size: 3.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--dbnz-text);
    line-height: 1;
    margin: 0 0 14px;
}

/* Tagline — small, muted, precise */
.dbnz-hero-tagline {
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.55;
    color: var(--dbnz-meta);
    margin: 0 0 44px;
    max-width: 380px;
}

/* Section pills */
.dbnz-hero-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dbnz-pill {
    display: inline-block;
    padding: 7px 16px;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dbnz-text);
    border: 1px solid var(--dbnz-border);
    text-decoration: none;
    line-height: 1;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.dbnz-pill:hover {
    background: var(--dbnz-text);
    color: var(--dbnz-bg);
    border-color: var(--dbnz-text);
    text-decoration: none;
}

/* GitHub pill — less prominent, external */
.dbnz-pill-external {
    color: var(--dbnz-meta);
    border-color: transparent;
    padding-left: 0;
}

.dbnz-pill-external:hover {
    background: transparent;
    color: var(--dbnz-text);
    border-color: transparent;
}

/* Feed section label */
.dbnz-feed-head {
    padding: 48px 0 16px;
}

.dbnz-feed-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--dbnz-meta);
}

@media (max-width: 767px) {
    .dbnz-hero {
        padding: 60px 0 52px;
    }

    .dbnz-hero-wordmark {
        font-size: 2.6rem;
    }

    .dbnz-hero-tagline {
        font-size: 1.5rem;
        margin-bottom: 36px;
    }
}

/* Dark mode hero */
html.dark-mode .dbnz-hero-wordmark {
    color: rgba(245, 245, 243, 0.92);
}

html.dark-mode .dbnz-hero-tagline {
    color: rgba(245, 245, 243, 0.4);
}

html.dark-mode .dbnz-pill {
    color: rgba(245, 245, 243, 0.8);
    border-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .dbnz-pill:hover {
    background: rgba(245, 245, 243, 0.9);
    color: #0D0F0C;
    border-color: transparent;
}

html.dark-mode .dbnz-pill-external {
    color: rgba(245, 245, 243, 0.35);
    border-color: transparent;
}

html.dark-mode .dbnz-pill-external:hover {
    background: transparent;
    color: rgba(245, 245, 243, 0.75);
}

html.dark-mode .dbnz-feed-label {
    color: rgba(245, 245, 243, 0.3);
}


/* 15. Nav wordmark (inner pages — CSS text, no SVG)
/* ---------------------------------------------------------- */

.dbnz-nav-wordmark {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--dbnz-text);
}

html.dark-mode .dbnz-nav-wordmark {
    color: rgba(245, 245, 243, 0.85);
}

/* On the homepage, the hero carries the identity.
   The nav logo is hidden by Casper's is-head-left-logo rule.
   On inner pages it shows. No override needed. */


/* 16. Nav — strip down to essentials
/* ---------------------------------------------------------- */

/* Ensure no search / members UI leaks in */
.gh-head-actions {
    display: none;
}

/* On mobile, restore actions area so menu layout works */
@media (max-width: 767px) {
    .gh-head-open #gh-head .gh-head-actions {
        display: flex;
    }
}

/* Nav link size bump on mobile menu */
@media (max-width: 767px) {
    #gh-head .nav a {
        font-size: 2rem;
        font-weight: 500;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--dbnz-text);
    }

    .gh-head-open #gh-head .gh-head-actions {
        background-color: var(--dbnz-bg) !important;
        padding-top: 0;
        padding-bottom: max(4vmin, 20px);
    }
}
