/* Musings: landing page and article pages. Builds on styles.css. */

/* ========================================
   Landing
   ======================================== */

.musings {
    padding-top: calc(7rem + 60px);
    padding-bottom: 8rem;
}

.musings-title {
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #111;
    margin-bottom: 0.75rem;
}

.musings-intro {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    max-width: 520px;
    margin-bottom: 3rem;
}

/* styles.css pads every <section>; these sit inside a page, not at its end */
.musings-year,
.musing-related {
    padding-bottom: 0;
}

.musings-year + .musings-year {
    margin-top: 2.5rem;
}

.musings-year-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.musings-list {
    list-style: none;
}

.musing-item {
    display: grid;
    gap: 0.35rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
}

.musings-list li:last-child .musing-item {
    border-bottom: 1px solid #eee;
}

.musing-item-meta {
    font-size: 0.8125rem;
    color: #888;
}

.musing-item-flag {
    margin-left: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #f3e6e9;
    color: #800020;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.musing-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: #111;
    transition: color 0.15s;
}

.musing-item:hover .musing-item-title,
.musing-item:focus-visible .musing-item-title {
    color: #800020;
}

.musing-item-desc {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
    max-width: 560px;
}

.musings-empty {
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    color: #666;
}

.musings-feed {
    margin-top: 2.5rem;
    font-size: 0.8125rem;
}

.musings-feed a,
.musing-linkedin a,
.musing-cta-links a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #ccc;
    transition: text-decoration-color 0.15s;
}

.musings-feed a:hover,
.musing-linkedin a:hover,
.musing-cta-links a:hover {
    text-decoration-color: #111;
}

/* ========================================
   Article
   ======================================== */

.musing {
    padding-top: calc(6rem + 60px);
    padding-bottom: 7rem;
}

.musing-flag {
    display: block;
    width: fit-content;
    margin-bottom: 1.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: #f3e6e9;
    color: #800020;
    font-size: 0.8125rem;
    font-weight: 500;
}

.musing-header {
    margin-bottom: 2.5rem;
}

.musing-eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #800020;
    margin-bottom: 0.75rem;
}

.musing-title {
    font-size: 2.375rem;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: #111;
    text-wrap: balance;
}

.musing-subtitle {
    margin-top: 0.875rem;
    font-size: 1.1875rem;
    line-height: 1.55;
    color: #555;
}

.musing-meta {
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: #888;
}

/* Long-form typography */
.prose {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #333;
}

.prose > * + * {
    margin-top: 1.25em;
}

.prose h2 {
    margin-top: 2.25em;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #111;
}

.prose h3 {
    margin-top: 1.9em;
    font-size: 1.1875rem;
    font-weight: 600;
    line-height: 1.4;
    color: #111;
}

.prose h2 + *,
.prose h3 + * {
    margin-top: 0.6em;
}

.prose strong {
    font-weight: 600;
    color: #111;
}

.prose a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #800020;
    text-decoration-thickness: 1px;
}

.prose a:hover {
    color: #800020;
}

.prose ul,
.prose ol {
    padding-left: 1.4em;
}

.prose li + li {
    margin-top: 0.45em;
}

.prose li::marker {
    color: #999;
}

.prose blockquote {
    padding-left: 1.25em;
    border-left: 2px solid #800020;
    color: #444;
    font-size: 1.125rem;
    line-height: 1.65;
}

.prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: #f4f4f4;
}

.prose pre {
    overflow-x: auto;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: #f6f6f6;
    border: 1px solid #eee;
    font-size: 0.875rem;
    line-height: 1.6;
}

.prose pre code {
    padding: 0;
    background: none;
    font-size: inherit;
}

.prose img,
.prose picture {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.prose hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2.5em 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.prose th,
.prose td {
    padding: 0.5rem 0.75rem 0.5rem 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

/* Footer of an article */
.musing-footer {
    margin-top: 3.5rem;
}

.musing-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 1.25rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 0.875rem;
}

.musing-share-label {
    color: #888;
    margin-right: 0.25rem;
}

.musing-share a,
.musing-share button {
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #111;
    background: #f3f3f3;
    border: 1px solid #eaeaea;
    border-radius: 999px;
    padding: 0.35rem 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}

.musing-share a:hover,
.musing-share button:hover {
    background: #e9e9e9;
}

.musing-share-status {
    font-size: 0.8125rem;
    color: #666;
}

.musing-linkedin {
    margin-top: 1.25rem;
    font-size: 0.9375rem;
}

.musing-cta {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid #eee;
}

.musing-cta h2 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.4rem;
}

.musing-cta p {
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.6;
}

.musing-cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 0.75rem;
}

.musing-related {
    margin-top: 3rem;
}

.musing-related h2 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 0.5rem;
}

.musing-related ul {
    list-style: none;
}

.musing-related a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 0;
    border-top: 1px solid #eee;
}

.musing-related li:last-child a {
    border-bottom: 1px solid #eee;
}

.musing-related-title {
    font-weight: 500;
    color: #111;
    transition: color 0.15s;
}

.musing-related a:hover .musing-related-title {
    color: #800020;
}

.musing-related-meta {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: #888;
}

/* Tracked links page */
.musing-links-list {
    list-style: none;
}

.musing-links-list li {
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.musing-links-title {
    font-weight: 500;
    color: #111;
    margin-bottom: 0.5rem;
}

.musing-links-row {
    display: flex;
    gap: 0.5rem;
}

.musing-links-row input {
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 0.8125rem;
    color: #444;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fafafa;
}

.musing-links-row button {
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border: 0;
    border-radius: 6px;
    background: #111;
    color: #fff;
    cursor: pointer;
}

.musing-links-status {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: #666;
}

/* Keyboard focus */
.musing-item:focus-visible,
.musing-related a:focus-visible,
.musing-share a:focus-visible,
.musing-share button:focus-visible,
.prose a:focus-visible {
    outline: 2px solid #800020;
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .musings {
        padding-top: calc(5rem + 60px);
    }

    .musings-title {
        font-size: 1.875rem;
    }

    .musing {
        padding-top: calc(4.5rem + 60px);
    }

    .musing-title {
        font-size: 1.875rem;
    }

    .musing-subtitle {
        font-size: 1.0625rem;
    }

    .prose {
        font-size: 1.0625rem;
        line-height: 1.7;
    }

    .musing-related a {
        flex-direction: column;
        gap: 0.2rem;
    }
}

@media (max-width: 480px) {
    .musings {
        padding-top: calc(4rem + 110px);
    }

    .musing {
        padding-top: calc(3.5rem + 110px);
    }
}
