/*
Theme Name: Precursor Flow
Theme URI: https://bloks.net/
Description: A clean one-person flow, timeline, and microblog child theme for Precursor.
Author: BLOKS
Author URI: https://bloks.net/
Template: precursor
Version: 0.5.0
Text Domain: precursor-flow
*/

:root {
    --precursor-bg: #f8fafc;
    --precursor-surface: #ffffff;
    --precursor-text: #0f172a;
    --precursor-muted: #64748b;
    --precursor-border: rgba(15, 23, 42, 0.12);
    --precursor-accent: #2563eb;
    --precursor-accent-dark: #1d4ed8;

    --flow-900: #1e3a8a;
    --flow-800: #1d4ed8;
    --flow-700: #2563eb;
    --flow-600: #3b82f6;
    --flow-500: #60a5fa;
    --flow-soft: #eff6ff;
    --flow-line: rgba(37, 99, 235, 0.22);
}

body.precursor-theme {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 32rem),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.10), transparent 32rem),
        var(--precursor-bg);
}

.precursor-site-header {
    position: relative;
    overflow: visible;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--precursor-border);
}

.precursor-site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    height: 5px;
    top: 0;
    background:
        linear-gradient(
            90deg,
            var(--flow-900),
            var(--flow-800),
            var(--flow-700),
            var(--flow-600),
            var(--flow-500)
        );
}

.precursor-button,
.wp-block-button__link {
    background:
        linear-gradient(
            135deg,
            var(--flow-800),
            var(--flow-600),
            var(--flow-500)
        );
    color: #ffffff;
}

/*
=================================================
Flow Layout
=================================================
*/

.flow-page {
    width: min(100% - 2rem, 920px);
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.flow-profile {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 28px;
    background: var(--precursor-surface);
    border: 1px solid var(--precursor-border);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.flow-avatar {
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(
            135deg,
            var(--flow-800),
            var(--flow-600),
            var(--flow-500)
        );
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
}

.flow-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
}

.flow-profile h1 {
    margin: 0 0 .35rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
    letter-spacing: -.04em;
}

.flow-profile p {
    margin: 0;
    color: var(--precursor-muted);
    font-size: 1.08rem;
}

.flow-links,
.flow-social {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}

.flow-links a,
.flow-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: .45rem .75rem;
    background: var(--flow-soft);
    border: 1px solid var(--precursor-border);
    color: var(--flow-800);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.flow-links a:hover,
.flow-social-link:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.28);
    background: #ffffff;
}

/*
=================================================
Flow Feed
=================================================
*/

.flow-feed {
    position: relative;
}

.flow-feed::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1.15rem;
    width: 2px;
    background: var(--flow-line);
}

.flow-post {
    position: relative;
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.flow-dot {
    position: relative;
    z-index: 2;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    background: var(--precursor-surface);
    border: 2px solid var(--flow-700);
    box-shadow: 0 0 0 6px var(--precursor-bg);
}

.flow-card {
    padding: 1.5rem;
    border-radius: 22px;
    background: var(--precursor-surface);
    border: 1px solid var(--precursor-border);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
}

.flow-card time {
    display: block;
    margin-bottom: .5rem;
    color: var(--precursor-muted);
    font-size: .85rem;
    font-weight: 700;
}

.flow-card h2,
.flow-card h3 {
    margin: 0 0 .75rem;
    font-size: 1.35rem;
    line-height: 1.2;
}

.flow-card h2 a,
.flow-card h3 a {
    color: var(--flow-700);
    text-decoration: none;
}

.flow-card h2 a:hover,
.flow-card h3 a:hover {
    text-decoration: underline;
}

.flow-card p {
    margin: 0 0 1rem;
    color: var(--precursor-text);
}

.flow-card p:last-child {
    margin-bottom: 0;
}

.flow-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.flow-tag {
    display: inline-flex;
    border-radius: 999px;
    padding: .3rem .6rem;
    background: #f1f5f9;
    color: var(--precursor-muted);
    font-size: .8rem;
    font-weight: 800;
}

.flow-pinned {
    border-color: rgba(37, 99, 235, 0.35);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 16rem),
        var(--precursor-surface);
}

.flow-pinned-label {
    display: inline-flex;
    margin-bottom: .75rem;
    border-radius: 999px;
    padding: .35rem .65rem;
    background: var(--flow-800);
    color: #ffffff;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/*
=================================================
Featured Projects
=================================================
*/

.flow-projects {
    margin: 2rem 0 3rem;
    padding: 1.75rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--precursor-border);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.flow-section-title {
    margin: 0 0 1.25rem;
    font-size: 1.1rem;
    font-weight: 800;
}

.flow-project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.flow-project-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--precursor-border);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.flow-project-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.flow-project-card h2 {
    margin: 0 0 .75rem;
    min-height: 4.8rem;
    font-size: 1.5rem;
}

.flow-project-card h3 {
    margin: 0 0 .5rem;
}

.flow-project-card h3 a {
    color: var(--flow-700);
    text-decoration: none;
}

.flow-project-card p {
    flex: 1;
    margin: 0;
    color: var(--precursor-muted);
    font-size: .95rem;
    line-height: 1.55;
}

.flow-project-status {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.flow-project-status.active {
    background: #e0f2fe;
    color: #0369a1;
}

.flow-project-status.experimental {
    background: #ede9fe;
    color: #6d28d9;
}

.flow-project-status.ideas {
    background: #f1f5f9;
    color: #475569;
}

/*
=================================================
Flow Content Components
=================================================
*/

.flow-entry {
    width: min(100% - 2rem, 840px);
    margin: 0 auto;
    padding: 4rem 0 5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.flow-entry h1,
.flow-entry h2 {
    margin: 0 0 2rem;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -.04em;
    color: var(--precursor-text);
}

.flow-entry p {
    margin: 0 0 1.35rem;
}

.flow-entry strong {
    color: var(--precursor-text);
}

.flow-break {
    width: 100%;
    height: 1px;
    margin: 2rem 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(37, 99, 235, 0.35),
            transparent
        );
}

.flow-note,
.flow-lesson {
    margin: 2rem 0;
    padding: 1.35rem 1.5rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 14rem),
        var(--precursor-surface);
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.flow-note strong,
.flow-lesson strong {
    display: block;
    margin-bottom: .35rem;
    color: var(--flow-800);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.flow-note p,
.flow-lesson p {
    margin-bottom: 0;
}

.flow-lesson {
    border-left: 5px solid var(--flow-700);
}

.flow-signature {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--precursor-border);
    color: var(--precursor-muted);
}

.flow-signature strong {
    display: block;
    color: var(--precursor-text);
}

.flow-signature em {
    display: block;
    margin-top: .25rem;
    font-style: normal;
    color: var(--precursor-muted);
}

/*
=================================================
Native Blog / Archive Views
=================================================
*/

body.blog .precursor-content,
body.archive .precursor-content {
    width: min(100% - 2rem, 840px);
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

body.blog .precursor-entry,
body.archive .precursor-entry {
    margin: 0 0 2rem;
    padding: 1.75rem 2rem;
    border-radius: 22px;
    background: var(--precursor-surface);
    border: 1px solid var(--precursor-border);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
}

body.blog .precursor-title,
body.archive .precursor-title {
    margin: 0 0 .65rem;
    color: var(--flow-700);
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    line-height: 1.12;
    letter-spacing: -.03em;
}

body.blog .precursor-title a,
body.archive .precursor-title a {
    color: inherit;
    text-decoration: none;
}

body.blog .precursor-title a:hover,
body.archive .precursor-title a:hover {
    text-decoration: underline;
}

body.blog .precursor-entry-meta,
body.archive .precursor-entry-meta {
    margin: 0 0 1rem;
    color: var(--precursor-muted);
    font-size: .9rem;
}

body.blog .precursor-entry-content,
body.archive .precursor-entry-content {
    color: var(--precursor-text);
}

body.blog .precursor-entry-content p:last-child,
body.archive .precursor-entry-content p:last-child {
    margin-bottom: 0;
}

body.archive .precursor-archive-header {
    width: min(100% - 2rem, 840px);
    margin: 0 auto 2rem;
}

/*
=================================================
Flow Archive Components
=================================================
*/

.flow-archive-year {
    margin: 3rem 0;
}

.flow-archive-year h2 {
    margin-bottom: 2rem;
}

.flow-archive-month {
    margin-bottom: 2.5rem;
}

.flow-archive-month h3 {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.flow-archive-month span {
    color: var(--precursor-muted);
    font-size: .9rem;
}

.flow-archive-month ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.flow-archive-month li {
    margin-bottom: .6rem;
}

.flow-archive-month a {
    text-decoration: none;
    color: var(--precursor-text);
    transition: color .2s ease;
}

.flow-archive-month a:hover {
    color: var(--flow-700);
}

/*
=================================================
Flow Single Posts
=================================================
*/

.flow-single-title {
    margin: 0 0 1rem;
    color: var(--flow-700);
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.flow-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 3rem;
    color: var(--precursor-muted);
    font-size: .95rem;
}

.flow-single-content > .flow-entry {
    width: 100%;
    margin: 0;
    padding: 0;
}

.flow-single-featured-image {
    margin: 0 0 2rem;
    border-radius: 22px;
    overflow: hidden;
}

.flow-single-tags {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--precursor-border);
}

.flow-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--precursor-border);
}

.flow-post-navigation-next {
    text-align: right;
}

.flow-post-navigation a {
    color: var(--flow-700);
    font-weight: 800;
    text-decoration: none;
}

.flow-post-navigation a:hover {
    text-decoration: underline;
}

/*
=================================================
Responsive
=================================================
*/

@media (max-width: 900px) {
    .flow-project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .flow-page,
    body.blog .precursor-content,
    body.archive .precursor-content {
        width: min(100% - 1rem, 920px);
        padding: 2rem 0 4rem;
    }

    .flow-profile {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }

    .flow-avatar {
        margin: 0 auto;
    }

    .flow-links,
    .flow-social {
        justify-content: center;
    }

    .flow-post {
        grid-template-columns: 1.8rem 1fr;
        gap: .75rem;
    }

    .flow-feed::before {
        left: .85rem;
    }

    .flow-dot {
        width: 1.8rem;
        height: 1.8rem;
    }

    .flow-card,
    body.blog .precursor-entry,
    body.archive .precursor-entry {
        padding: 1.25rem;
    }

    .flow-entry {
        width: min(100% - 1.25rem, 840px);
        padding: 3rem 0 4rem;
    }

    .flow-note,
    .flow-lesson {
        padding: 1.2rem;
        border-radius: 18px;
    }

    .flow-post-navigation {
        grid-template-columns: 1fr;
    }

    .flow-post-navigation-next {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .flow-projects {
        padding: 1.25rem;
    }

    .flow-project-grid {
        grid-template-columns: 1fr;
    }
}