/* buruwork — newspaper style theme
   grid + serif headlines + ruled lines + high readability */

:root {
    --paper: #fbf8f1;
    --paper-soft: #f3eee2;
    --ink: #1c1a17;
    --ink-soft: #4d463a;
    --muted: #837a68;
    --rule: #cfc6b2;
    --rule-strong: #1c1a17;
    --accent: #b01e23;
    --serif: Georgia, "Times New Roman", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --measure: 1080px;
    --gutter: 24px;
}

* {
    box-sizing: border-box;
}

html {
    background: #ece7da;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--ink);
    text-decoration-color: var(--rule);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 8px 14px;
    z-index: 10;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* ---------- masthead ---------- */

.masthead {
    border-bottom: 3px double var(--rule-strong);
    background: var(--paper);
}

.masthead__topline {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 8px 20px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1px solid var(--rule);
}

.masthead__edition {
    margin-left: auto;
    text-transform: uppercase;
}

.masthead__search {
    display: flex;
    gap: 6px;
}

.masthead__search input {
    border: 1px solid var(--rule);
    background: #fffdf7;
    color: var(--ink);
    padding: 4px 8px;
    font: inherit;
    width: 150px;
}

.masthead__search button {
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font: inherit;
    padding: 4px 10px;
    cursor: pointer;
}

.masthead__brand {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 34px 20px 20px;
    text-align: center;
}

.masthead__name {
    display: inline-block;
    font-size: clamp(44px, 8vw, 84px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0.02em;
    text-decoration: none;
    font-variant: small-caps;
}

.masthead__logo img {
    max-height: 120px;
    margin: 0 auto;
}

.masthead__tagline {
    margin: 14px auto 0;
    max-width: 640px;
    font-size: 15px;
    color: var(--ink-soft);
    letter-spacing: 0.12em;
}

.masthead__nav {
    max-width: var(--measure);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    padding: 0 20px 14px;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    font-family: var(--sans);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.masthead__nav a {
    padding: 10px 2px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.masthead__nav a.active,
.masthead__nav a:hover {
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.catbar {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 4px 20px 8px;
}

.catbar-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin: 0;
    padding: 6px 0;
    font-size: 14px;
    color: var(--muted);
}

.catbar-list a {
    text-decoration: none;
}

/* ---------- layout ---------- */

.site-main {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.page-heading {
    border-bottom: 3px double var(--rule-strong);
    margin-bottom: 26px;
    padding-bottom: 12px;
}

.page-heading__title {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.kicker {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 8px;
}

.byline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.byline__item + .byline__item::before {
    content: "·";
    margin-right: 14px;
    color: var(--rule);
}

/* ---------- featured ---------- */

.featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    border-bottom: 3px double var(--rule-strong);
    padding-bottom: 28px;
    margin-bottom: 30px;
}

.featured__title {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.featured__title a {
    text-decoration: none;
}

.featured__excerpt {
    margin: 0 0 16px;
    font-size: 18px;
    color: var(--ink-soft);
}

.featured__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--rule);
    aspect-ratio: 4 / 3;
}

/* ---------- story grid ---------- */

.story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    border-top: 3px double var(--rule-strong);
    padding-top: 26px;
}

.story {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 22px;
}

.story__media {
    display: block;
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--paper-soft);
}

.story__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.story:hover .story__media img {
    transform: scale(1.04);
}

.story__title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
}

.story__title a {
    text-decoration: none;
}

.story__title a:hover {
    color: var(--accent);
}

.story__excerpt {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-soft);
}

.story__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.story__body .byline {
    margin-top: auto;
}

/* ---------- single ---------- */

.single {
    max-width: 760px;
    margin: 0 auto;
}

.single__header {
    position: relative;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 3px double var(--rule-strong);
    text-align: center;
}

.single__title {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.single__header .byline {
    justify-content: center;
}

.single__cover {
    margin: 0 0 28px;
}

.single__cover img {
    width: 100%;
    border: 1px solid var(--rule);
}

.single__content {
    font-size: 18px;
    line-height: 1.9;
}

.single__content > p:first-child::first-letter {
    float: left;
    font-size: 62px;
    line-height: 0.85;
    padding: 4px 12px 0 0;
    font-weight: 900;
    color: var(--accent);
}

.single__content pre {
    background: #f4efe3;
    border: 1px solid var(--rule);
    padding: 14px 16px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.6;
}

.single__content blockquote {
    margin: 1.5em 0;
    padding: 4px 0 4px 20px;
    border-left: 4px solid var(--accent);
    color: var(--ink-soft);
}

.single__tags {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
    font-family: var(--sans);
    font-size: 14px;
    color: var(--muted);
}

.post-nav {
    max-width: 760px;
    margin: 26px auto 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--sans);
    font-size: 14px;
}

/* ---------- pagination ---------- */

.page-navigator {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--rule);
    font-family: var(--sans);
    font-size: 14px;
}

.page-navigator li {
    border: 1px solid var(--rule);
    background: #fffdf6;
}

.page-navigator a,
.page-navigator span {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
}

.page-navigator li.current {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ---------- comments ---------- */

.comments {
    max-width: 760px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 3px double var(--rule-strong);
}

.comments__title,
.respond__title {
    font-size: 24px;
    font-weight: 900;
}

.comment-list {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.comment-list .comment-body {
    position: relative;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}

.comment-list .comment-children {
    list-style: none;
    margin: 0;
    padding-left: 28px;
    border-left: 2px solid var(--rule);
}

.comment-author {
    font-weight: 700;
}

.comment-meta {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--muted);
    margin-left: 8px;
}

.comment-content p {
    margin: 10px 0 0;
}

.comment-reply {
    font-family: var(--sans);
    font-size: 12px;
}

.respond {
    margin-top: 24px;
}

.respond__form {
    display: grid;
    gap: 14px;
    max-width: 560px;
}

.respond__field {
    margin: 0;
    display: grid;
    gap: 6px;
}

.respond__label {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink-soft);
}

.respond__label.required::after {
    content: " *";
    color: var(--accent);
}

.respond input[type="text"],
.respond input[type="email"],
.respond input[type="url"],
.respond textarea {
    width: 100%;
    border: 1px solid var(--rule);
    background: #fffdf6;
    color: var(--ink);
    font: inherit;
    padding: 10px 12px;
}

.respond textarea {
    resize: vertical;
}

.button {
    display: inline-block;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 14px;
    padding: 9px 20px;
    cursor: pointer;
    text-decoration: none;
}

.button:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.cancel-comment-reply a {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--accent);
}

/* ---------- empty / footer ---------- */

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--ink-soft);
}

.empty-state__code {
    font-size: 96px;
    font-weight: 900;
    line-height: 1;
    margin: 0 0 10px;
    color: var(--accent);
}

.empty-state__title {
    font-size: 26px;
    font-weight: 800;
}

.site-footer {
    border-top: 3px double var(--rule-strong);
    background: var(--paper-soft);
    margin-top: 40px;
}

.site-footer__inner {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 26px 20px 40px;
    text-align: center;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
}

.site-footer__name {
    font-size: 24px;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 8px;
}

.site-footer__meta {
    margin: 0 0 6px;
}

.site-footer__links {
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.site-footer__links a {
    color: var(--ink-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .masthead__topline {
        flex-wrap: wrap;
    }

    .masthead__edition {
        margin-left: 0;
    }

    .masthead__search {
        width: 100%;
    }

    .masthead__search input {
        flex: 1;
        width: auto;
    }

    .featured {
        grid-template-columns: 1fr;
    }

    .story-grid {
        grid-template-columns: 1fr;
    }
}