/* Eunoia — Twenty Twenty-inspired theme: cream paper, bold black type,
   rose accent, black-framed images, uppercase small-caps meta. */

:root {
    --ink: #000;
    --muted: #6d6d6d;
    --accent: #cd2653;
    --paper: #f5efe0;
    --surface: #fff;
    --rule: #dcd7ca;
    --code-bg: #ece5d3;
    --font-family: Georgia, 'Times New Roman', serif;
    --font-size: 18px;
    --heading-family: 'Segoe UI', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
}

a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top-bar { height: 6px; background: var(--accent); }

.site-head {
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
}

.head-inner {
    max-width: 46rem;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font: 800 1.6rem/1.15 var(--heading-family);
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
}
.site-title .dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

.search input {
    font: 14px/1.4 var(--heading-family);
    letter-spacing: 0.02em;
    padding: 0.5rem 0 0.4rem;
    border: 0;
    border-bottom: 2px solid var(--ink);
    background: transparent;
    color: var(--ink);
    width: 11rem;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); }

.page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 0 1.5rem 3.5rem;
}

.list-heading {
    font: 800 1.7rem/1.25 var(--heading-family);
    margin: 2.5rem 0 0.5rem;
}

.meta {
    font: 700 12px/1.4 var(--heading-family);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 0 0 0.6rem;
}
.meta .sep { color: var(--muted); margin: 0 0.1rem; }
.meta time { color: var(--muted); }

h1 {
    font: 800 2.4rem/1.15 var(--heading-family);
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 1.25rem;
}

.summary {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--rule);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.summary:first-of-type { padding-top: 2rem; }
.summary:not(.has-thumb) { display: block; }
.summary p:last-of-type { margin-bottom: 0.75rem; }

.summary .thumb {
    display: block;
    flex: none;
    width: 8.5rem;
    height: 8.5rem;
    border: 1px solid var(--ink);
    padding: 5px;
    background: var(--surface);
}
.summary .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.summary-body { min-width: 0; flex: 1; }

.summary h2 { font: 800 1.5rem/1.25 var(--heading-family); margin: 0 0 0.5rem; letter-spacing: -0.005em; }
.summary h2 a { color: var(--ink); text-decoration: none; }
.summary h2 a:hover { color: var(--accent); }

.more {
    display: inline-block;
    font: 700 13px/1 var(--heading-family);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 3px;
}
.more:hover { color: var(--accent); }

.post h1 { margin-top: 0.25rem; }

.post-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--ink);
    padding: 6px;
    background: var(--surface);
    margin: 1.5rem 0;
}
.post-body pre {
    background: var(--code-bg);
    padding: 0.9rem 1rem;
    overflow-x: auto;
    font-size: 14px;
    border: 1px solid var(--rule);
}
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--code-bg); padding: 0.1rem 0.3rem; }
.post-body pre code { background: none; padding: 0; }
.post-body blockquote {
    margin: 1.5rem 0;
    padding: 0.2rem 0 0.2rem 1.25rem;
    border-left: 4px solid var(--accent);
    color: var(--muted);
    font-style: italic;
    font-size: 1.1em;
}
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.tags { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.tags::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 0.35rem;
}
.tags a {
    font: 700 12px/1 var(--heading-family);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    text-decoration: none;
    padding: 0.3rem 0;
}
.tags a::after { content: '/'; margin-left: 0.35rem; color: var(--rule); font-weight: 400; }
.tags li:last-child a::after { content: ''; margin: 0; }
.tags a:hover { color: var(--accent); }

.pagination {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    margin: 2.5rem 0 0;
    font: 700 13px/1 var(--heading-family);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-wrap: wrap;
}
.pagination .current { color: var(--accent); }
.pagination a { text-decoration: none; color: var(--ink); }
.pagination a:hover { color: var(--accent); }

.site-foot {
    margin-top: 2.5rem;
    padding: 1.75rem 0 0;
    border-top: 1px solid var(--rule);
    font: 14px/1.6 var(--heading-family);
    color: var(--muted);
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: baseline; margin-bottom: 0.75rem; }
.tag-cloud a { text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; }
.tag-cloud .w1 { font-size: 0.75rem; color: var(--muted); }
.tag-cloud .w2 { font-size: 0.82rem; color: var(--muted); }
.tag-cloud .w3 { font-size: 0.92rem; color: var(--ink); }
.tag-cloud .w4 { font-size: 1.02rem; color: var(--ink); font-weight: 700; }
.tag-cloud .w5 { font-size: 1.15rem; color: var(--accent); font-weight: 700; }

.empty { color: var(--muted); font-style: italic; }

.footer-note { font-style: italic; }

@media (max-width: 34rem) {
    body { font-size: 16px; }
    h1 { font-size: 1.9rem; }
    .search input { width: 100%; }
    .head-inner { flex-direction: column; align-items: flex-start; }
    .summary { flex-direction: column; }
    .summary .thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
