/*
Theme Name: Flow Dynamics Blog
Theme URI: https://flow-dynamics.co/blog
Description: Flow Dynamics child theme of Twenty Twenty-Five. Reuses the static site's header/footer markup, palette (paper/teal), and Fraunces + IBM Plex typography.
Author: Flow Dynamics
Template: twentytwentyfive
Version: 1.2.0
License: GNU General Public License v2 or later
Text Domain: flow-dynamics-blog
*/

/* All custom rules namespaced with .fd- so they can't collide with TT5 or core blocks. */

.fd-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 2;
}

/* ---- nav ---- */
.fd-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid rgba(13, 27, 30, 0.12);
    gap: 24px;
}
.fd-logo a { display: block; line-height: 0; }
.fd-logo img { height: 38px; width: auto; display: block; }
.fd-nav-right { display: flex; align-items: center; gap: 28px; }
.fd-nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.fd-nav-links a {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0d1b1e;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.fd-nav-links a:hover { opacity: 1; }
.fd-nav-links a.current { opacity: 1; color: #0f3d3e; }
.fd-nav-cta {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 2px;
    background: #0f3d3e;
    color: #f4f1ea;
    transition: background 0.2s, transform 0.2s;
}
.fd-nav-cta:hover { background: #3ab37f; transform: translateY(-1px); }
@media (max-width: 700px) {
    .fd-nav-links { display: none; }
    .fd-logo img { height: 32px; }
    .fd-nav-cta { padding: 9px 14px; font-size: 13px; }
}

/* ---- footer ---- */
.fd-footer {
    border-top: 1px solid rgba(13, 27, 30, 0.12);
    padding: 56px 0 40px;
    font-size: 14px;
    color: #5a6b6c;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}
.fd-foot-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    align-items: start;
}
@media (max-width: 720px) {
    .fd-foot-grid { grid-template-columns: 1fr; gap: 28px; }
}
.fd-foot-brand img { height: 30px; width: auto; display: block; margin-bottom: 16px; }
.fd-foot-brand p { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.7; margin: 0; }
.fd-foot-col h4 {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #3ab37f;
    font-weight: 500;
    margin: 0 0 16px;
}
.fd-foot-col a { color: #5a6b6c; text-decoration: none; display: block; padding: 3px 0; }
.fd-foot-col a:hover { color: #0f3d3e; }
.fd-foot-col p { font-size: 14px; line-height: 1.7; margin: 0; }
.fd-foot-bottom {
    border-top: 1px solid rgba(13, 27, 30, 0.12);
    margin-top: 44px;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
}
.fd-foot-legal {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(13, 27, 30, 0.12);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 11px;
    color: #5a6b6c;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* ---- post body tweaks (kept here, not in theme.json, because they target
 *      WP's wrapper classes rather than block-level style hooks) ---- */
.wp-block-post-title { letter-spacing: -0.02em; }
.wp-block-post-content a:where(:not(.wp-element-button)) {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Drop TT5's wide spacing in front of header/footer parts so the flush
 * static-site nav doesn't get pushed off the top of the viewport. */
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > footer.wp-block-template-part {
    margin-top: 0;
    margin-bottom: 0;
}

/* ============================================================================
 * Blog index (home.html) — typographic single-column list.
 * Built on the same tokens as the static site: Fraunces / IBM Plex,
 * teal #0f3d3e, green #3ab37f, ink #0d1b1e, muted #5a6b6c,
 * hairline rgba(13,27,30,0.12). No images, no cards, no clutter.
 * ============================================================================ */

.fd-page-header {
    margin: 80px auto 56px;
    padding: 0 32px;
}
.fd-eyebrow {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #3ab37f;
    margin: 0 0 20px;
}
.fd-page-h1 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.022em;
    color: #0d1b1e;
    margin: 0;
    max-width: 20ch;
}

/* --- post list --- */
.fd-post-list { padding: 0 32px; margin: 0 auto 80px; }
.fd-post-template { list-style: none; padding: 0; margin: 0; }
.fd-post-template > li { list-style: none; }
.fd-post-item {
    padding: 36px 0;
    border-top: 1px solid rgba(13, 27, 30, 0.12);
}
.fd-post-template > li:last-child .fd-post-item {
    border-bottom: 1px solid rgba(13, 27, 30, 0.12);
}

.fd-post-date {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a6b6c;
    margin: 0 0 14px;
}

.fd-post-title {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: clamp(24px, 2.8vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 0 14px;
}
.fd-post-title a {
    color: #0d1b1e;
    text-decoration: none;
    transition: color 0.15s;
}
.fd-post-title a:hover { color: #0f3d3e; }

.fd-post-excerpt { margin: 0; }
.fd-post-excerpt .wp-block-post-excerpt__excerpt,
.fd-post-excerpt p {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: #5a6b6c;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Title is the entry — hide WP's redundant "read more" link */
.fd-post-excerpt .wp-block-post-excerpt__more-link,
.fd-post-excerpt .wp-block-post-excerpt__more-text { display: none; }

.fd-empty {
    padding: 48px 0;
    color: #5a6b6c;
    font-style: italic;
    text-align: center;
}

/* --- pagination --- */
.fd-pagination {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(13, 27, 30, 0.12);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 13px;
    align-items: center;
}
.fd-pagination a,
.fd-pagination .page-numbers,
.fd-pagination .wp-block-query-pagination-numbers,
.fd-pagination .wp-block-query-pagination-previous,
.fd-pagination .wp-block-query-pagination-next {
    color: #5a6b6c;
    text-decoration: none;
    transition: color 0.15s;
}
.fd-pagination a:hover { color: #0f3d3e; }
.fd-pagination .page-numbers.current,
.fd-pagination .current {
    color: #0d1b1e;
    font-weight: 600;
}
.fd-pagination .page-numbers + .page-numbers { margin-left: 14px; }

/* ============================================================================
 * Single post (single.html) — long-form reading typography.
 * ============================================================================ */

.fd-post {
    padding: 0 32px;
    margin: 56px auto 96px;
}

.fd-post-meta {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(13, 27, 30, 0.12);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5a6b6c;
}
.fd-post-meta .fd-post-date { margin: 0; }
.fd-back-link { margin: 0; }
.fd-back-link a {
    color: #5a6b6c;
    text-decoration: none;
    transition: color 0.15s;
}
.fd-back-link a:hover { color: #0f3d3e; }

.fd-post-h1 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: #0d1b1e;
    margin: 0 0 44px;
}

.fd-post-content {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #15201d;
}
.fd-post-content > * + * { margin-top: 24px; }
.fd-post-content h2 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: clamp(24px, 2.8vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: #0d1b1e;
    margin-top: 56px;
    margin-bottom: 16px;
}
.fd-post-content h3 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.3;
    color: #0d1b1e;
    margin-top: 40px;
    margin-bottom: 12px;
}
.fd-post-content p { margin: 0 0 24px; }
.fd-post-content a:where(:not(.wp-element-button)) {
    color: #0f3d3e;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s;
}
.fd-post-content a:where(:not(.wp-element-button)):hover { color: #3ab37f; }
.fd-post-content ul, .fd-post-content ol { margin: 0 0 24px 1.4em; padding: 0; }
.fd-post-content li { margin-bottom: 10px; }
.fd-post-content blockquote {
    border-left: 3px solid #0f3d3e;
    margin: 32px 0;
    padding: 4px 0 4px 24px;
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 21px;
    line-height: 1.5;
    color: #5a6b6c;
}
.fd-post-content code {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.92em;
    background: #ece7db;
    padding: 1px 6px;
    border-radius: 2px;
}
.fd-post-content pre {
    background: #142628;
    color: #f4f1ea;
    padding: 20px 24px;
    border-radius: 2px;
    overflow-x: auto;
    margin: 32px 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 14px;
    line-height: 1.5;
}
.fd-post-content pre code { background: transparent; padding: 0; color: inherit; }
.fd-post-content img,
.fd-post-content .wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 36px auto;
    border-radius: 2px;
}
.fd-post-content figure { margin: 36px 0; }
.fd-post-content figcaption {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    color: #5a6b6c;
    text-align: center;
    margin-top: 10px;
}
.fd-post-content hr {
    border: 0;
    border-top: 1px solid rgba(13, 27, 30, 0.12);
    margin: 48px 0;
}
.fd-post-content table { border-collapse: collapse; width: 100%; margin: 24px 0; font-size: 16px; }
.fd-post-content th, .fd-post-content td {
    border-bottom: 1px solid rgba(13, 27, 30, 0.12);
    padding: 10px 12px;
    text-align: left;
}
.fd-post-content th {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a6b6c;
    font-weight: 500;
}

/* --- responsive --- */
@media (max-width: 700px) {
    .fd-page-header, .fd-post-list, .fd-post { padding: 0 18px; }
    .fd-page-header { margin: 56px auto 40px; }
    .fd-post-item { padding: 28px 0; }
    .fd-post { margin: 36px auto 64px; }
    .fd-post-h1 { margin-bottom: 32px; }
    .fd-post-content { font-size: 17px; }
}
