@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&display=swap");

:root {
    --bg: #F1F1F1;
    --text: #181818;
    --muted: #5f5f5f;
    --line: #d4d4d4;
    --card: #f7f7f7;
    --accent: #181818;
    --secondary: #5f5f5f;
    --mono: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

a {
    color: inherit;
}

.shell {
    width: min(980px, calc(100% - 40px));
    margin: 0 auto;
}

.site-main {
    min-height: 100svh;
}

.page-wrap,
.article {
    padding: 64px 0 72px;
}

.page-head h1,
.article h1,
.eyebrow {
    margin: 0;
    font-size: clamp(1.8rem, 3.8vw, 3rem);
    letter-spacing: -0.02em;
}

.page-kicker {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prose {
    margin-top: 24px;
    line-height: 1.9;
}

.prose h2,
.prose h3 {
    margin-top: 36px;
    margin-bottom: 10px;
    line-height: 1.35;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0 0 14px;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.prose a,
.inline-link {
    text-underline-offset: 3px;
}

.timeline-prose {
    margin-top: 30px;
}

.timeline-prose > p {
    margin-bottom: 14px;
}

.timeline-prose h2 {
    margin: 28px 0 8px;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: var(--mono);
}

.timeline-prose h3 {
    margin: 0;
    padding: 8px 0 12px 30px;
    font-size: 1.02rem;
    line-height: 1.55;
    position: relative;
}

.timeline-prose h3::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 19px;
    width: 11px;
    border-top: 1px solid var(--line);
}

.timeline-prose h3::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--line);
}

.timeline-prose h2 + h3 {
    margin-top: 0;
    padding-top: 4px;
}

.timeline-prose h2 + h3::after {
    top: -12px;
}

.timeline-prose h3 + h2 {
    margin-top: 12px;
}

.timeline-prose p a {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    text-decoration: none;
    font-size: 0.82rem;
}

/* Monaco-respect style for code blocks only */
.prose pre,
.prose .highlight pre,
pre.mermaid {
    margin: 20px 0;
    padding: 14px 16px;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #2f2f2f;
    background: #1e1e1e;
    color: #d4d4d4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.prose pre code,
.prose .highlight pre code,
pre.mermaid code {
    font-family: Monaco, Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.87rem;
    line-height: 1.6;
    tab-size: 2;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.article-head {
    margin-top: 14px;
}

.article-lead {
    margin: 0;
    color: #2d2d2d;
}

.lead-meta-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.lead-meta-row .article-lead {
    flex: 0 1 auto;
    min-width: 0;
}

.tags-inline {
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    flex: 0 0 auto;
}

.tag-pill {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    text-decoration: none;
    font-size: 0.86rem;
    color: #3d3d3d;
    background: #fff;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

@media (max-width: 760px) {
    .lead-meta-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .tags-inline {
        flex-wrap: wrap;
    }
}

.meta-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: 0.88rem;
}

.card-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.card-grid.card-grid--works {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 760px) {
    .card-grid.card-grid--works {
        grid-template-columns: 1fr !important;
    }
}

.entry-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    overflow: hidden;
}

.work-link,
.work-media-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.entry-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #e6e6e6;
}

.entry-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.entry-media--fallback {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.entry-body {
    padding: 14px 16px 16px;
}

.entry-card h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

.work-card:hover .entry-media img {
    transform: scale(1.02);
}

.entry-media img {
    transition: transform 0.28s ease;
}

.work-title-link {
    color: inherit;
    text-decoration: none;
}

.work-title-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.entry-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.86rem;
    color: #3d3d3d;
    background: #fff;
    font-family: var(--mono);
    font-optical-sizing: auto;
}

.meta-pill--tag {
    text-decoration: none;
    padding: 4px 10px;
    font-size: 0.8rem;
}

.meta-pill--tag:hover {
    border-color: #181818;
    color: #181818;
}

.mono-meta {
    font-family: var(--mono);
    font-optical-sizing: auto;
}

.tags {
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags a {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    text-decoration: none;
    font-size: 0.82rem;
}

.muted {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
}

.footer-inner {
    min-height: 58px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    color: var(--muted);
}

.footer-copy {
    grid-column: 1;
    justify-self: start;
}

.footer-social {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
}

.footer-social a {
    color: inherit;
    text-decoration: none;
}

.footer-social a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-sep {
    color: #909090;
}

@media (max-width: 700px) {
    .shell {
        width: min(980px, calc(100% - 28px));
    }

    .page-wrap,
    .article {
        padding-top: 46px;
    }

    .footer-inner {
        min-height: auto;
        padding: 10px 0;
        grid-template-columns: 1fr;
        row-gap: 6px;
        justify-items: center;
    }

    .footer-copy,
    .footer-social {
        grid-column: 1;
        justify-self: center;
    }
}
