/* ========== BLOG & JOURNAL — shared shell (matches .projects) ========== */
.blog,
.journal,
.blog-post {
    padding: 6rem 8% 8rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cancel double top padding when page-section is also applied */
.blog.page-section,
.journal.page-section,
.blog-post.page-section {
    padding-top: 6rem;
}

.journal-desc {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 0.75rem;
    margin-bottom: 2.75rem;
}

.journal .page-heading {
    margin-bottom: 0;
}

/* ========== BLOG SEARCH ========== */
.blog-search-wrap {
    margin-bottom: 2rem;
}

.blog-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: text;
}

.blog-search-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    color: var(--muted);
    transition: color 0.3s var(--ease);
}

.blog-search:focus-within .blog-search-icon {
    color: var(--gold);
}

.blog-search-input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--black);
    padding: 0.6rem 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    transition: border-color 0.3s var(--ease);
}

.blog-search-input::placeholder {
    color: var(--muted);
}

.blog-search-input:hover {
    border-bottom-color: color-mix(in srgb, var(--gold) 35%, var(--border));
}

.blog-search-input:focus {
    outline: none;
    border-bottom-color: var(--gold);
}

.blog-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 1rem;
    width: 1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A9A9A' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center / contain no-repeat;
    cursor: pointer;
}

.blog-search-status {
    min-height: 1.25rem;
    margin-top: 0.65rem;
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.blog-empty {
    padding: 2.5rem 0 1rem;
    font-size: 0.95rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.blog-card.is-hidden {
    display: none;
}

.blog-card.is-hidden + .blog-card:not(.is-hidden) {
    border-top-width: 1px;
}

/* ========== BLOG INDEX ========== */
.blog-list {
    display: flex;
    flex-direction: column;
}

.blog-list--compact .blog-card {
    padding: 1.5rem 0;
}

.blog-card {
    display: block;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    transition: padding-left 0.3s var(--ease);
}

.blog-card:last-child {
    border-bottom: 1px solid var(--border);
}

.blog-card:hover {
    padding-left: 0.75rem;
}

.blog-card-date {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.blog-card-title {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 1rem;
    max-width: 500px;
}

.blog-card .project-tags {
    margin-top: 0;
}

.blog-card:hover .project-tags span {
    opacity: 0.8;
}

.blog-back {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.02em;
    transition: color 0.3s var(--ease);
}

.blog-back:hover {
    color: var(--gold);
}

/* ========== POST DETAIL ========== */
.blog-post-inner {
    width: 100%;
}

.blog-post-nav {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.blog-post-header {
    margin-bottom: 2.75rem;
}

.blog-post-header .blog-card-date {
    margin-bottom: 0.75rem;
}

.blog-post-header .project-tags {
    margin-top: 1rem;
}

.blog-post-title {
    font-size: var(--text-display-lg);
    line-height: 1.15;
    font-weight: 600;
    display: block;
    max-width: none;
}

.blog-post-body {
    font-family: var(--font-body);
    font-size: var(--text-body-lg);
    color: var(--black);
    line-height: 1.8;
}

.blog-post-body p {
    margin-bottom: 1.35rem;
}

.blog-post-body p:last-child {
    margin-bottom: 0;
}

.blog-post-body code {
    font-size: 0.88em;
    padding: 0.15em 0.4em;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    color: var(--dark);
    font-family: var(--font-mono);
}

.blog-post-footer {
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.blog-footer-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.02em;
    transition: gap 0.3s var(--ease);
}

.blog-footer-link:hover {
    opacity: 0.75;
}

/* ========== PROJECT JOURNAL ========== */
.journal-header {
    margin-bottom: 3.25rem;
}

.journal-header .page-heading {
    margin-bottom: 0.75rem;
    display: block;
    max-width: none;
}

.journal-external {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 2rem;
    margin-top: 1.25rem;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.journal-external svg {
    width: 16px;
    height: 16px;
}

.journal-external:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.journal .blog-back {
    margin-bottom: 0;
}

.journal-section {
    margin-bottom: 3.25rem;
}

.journal-section-title {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.journal-empty {
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
}

/* Live-news timeline — marker column + content column */
.timeline {
    --timeline-gutter: 1.5rem;
    --timeline-line: 2px;
    --timeline-dot: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: var(--timeline-gutter) minmax(0, 1fr);
    column-gap: 1.25rem;
    position: relative;
    padding-bottom: 2.75rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Vertical connector between dots */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(var(--timeline-gutter) / 2 - var(--timeline-line) / 2);
    top: calc(var(--timeline-dot) + 0.35rem);
    bottom: 0;
    width: var(--timeline-line);
    background: var(--border);
    pointer-events: none;
}

.timeline-marker {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    padding-top: 0.15rem;
    position: relative;
    z-index: 1;
}

.timeline-marker::before {
    content: '';
    width: var(--timeline-dot);
    height: var(--timeline-dot);
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gold);
    box-sizing: border-box;
    flex-shrink: 0;
}

.timeline-item--latest .timeline-marker::before {
    background: var(--gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
    animation: timelinePulse 2.5s var(--ease) infinite;
}

@keyframes timelinePulse {
    0%, 100% {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
    }
    50% {
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 8%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline-item--latest .timeline-marker::before {
        animation: none;
    }
}

.timeline-content {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.timeline-date {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.timeline-item--latest .timeline-date::after {
    content: ' · latest';
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: lowercase;
}

.timeline-title {
    font-size: 1.125rem;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.timeline-body {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.75;
}

.timeline-body p {
    margin-bottom: 0.85rem;
}

.timeline-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .blog,
    .journal,
    .blog-post {
        padding: 4rem 6% 6rem;
    }

    .blog.page-section,
    .journal.page-section,
    .blog-post.page-section {
        padding-top: 6rem;
    }

    .blog-post-title {
        max-width: none;
    }

    .blog-post-nav {
        margin-bottom: 2rem;
        padding-bottom: 1.25rem;
    }

    .blog-post-header {
        margin-bottom: 2.25rem;
    }
}

