:root {
    --ink: #1a1208;
    --paper: #f5f0e8;
    --cream: #ede8dc;
    --gold: #c9973a;
    --gold-light: #e8c97a;
    --rust: #b5451b;
    --sage: #4a6741;
    --muted: #7a6e5f;
    --rule: #c8bfad;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Noto Serif SC', serif;
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 32px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 999;
}

/* ── MASTHEAD ── */
.masthead {
    text-align: center;
    padding-bottom: 28px;
    border-bottom: 3px double var(--rule);
    position: relative;
}

.masthead-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.masthead h1 {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--ink);
}

.masthead h1 span {
    color: var(--gold);
    font-style: italic;
}

.masthead-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
}

.masthead-meta .dot {
    color: var(--gold);
}

/* ── DATE NAV ── */
.date-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.date-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid var(--rule);
    transition: border-color 0.2s, color 0.2s;
}

.date-nav a:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.date-nav .current-date {
    color: var(--ink);
    font-weight: 500;
}

/* ── SECTION HEADER ── */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 20px;
}

.section-header .rule {
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.section-header h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

/* ── BLOGGER CARD ── */
.blogger-card {
    background: var(--cream);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--gold);
    padding: 20px 22px;
    margin-bottom: 20px;
    position: relative;
}

.blogger-card:nth-child(3n+2) {
    border-left-color: var(--rust);
}

.blogger-card:nth-child(3n+3) {
    border-left-color: var(--sage);
}

.blogger-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.blogger-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

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

.blogger-name a:hover {
    color: var(--gold);
}

.blogger-handle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

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

.blogger-handle a:hover {
    color: var(--gold);
}

/* ── 折叠 ── */
.blogger-header {
    cursor: pointer;
    user-select: none;
}

.blogger-toggle {
    font-size: 11px;
    color: var(--muted);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 10px;
    align-self: center;
}

.blogger-card.collapsed .blogger-toggle {
    transform: rotate(-90deg);
}

.blogger-body {
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

.blogger-card.collapsed .blogger-body {
    max-height: 0;
    opacity: 0;
}

.blogger-stats {
    text-align: right;
    flex-shrink: 0;
}

.stat-row {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.8;
}

.stat-num {
    color: var(--ink);
    font-weight: 500;
}

/* ── TWEET ── */
.tweet {
    border-top: 1px dashed var(--rule);
    padding-top: 12px;
    margin-top: 12px;
    position: relative;
}

.tweet-link {
    position: absolute;
    top: 12px;
    right: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--rule);
    padding: 2px 7px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.tweet-link:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.tweet-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 6px;
}

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

.tweet-time a:hover {
    color: var(--gold);
}

.tweet-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
}

.tweet-metrics {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.metric {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
}

.metric strong {
    color: var(--ink);
}

/* ── QUOTED TWEET ── */
.quoted-tweet {
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid var(--rule);
    background: rgba(200, 191, 173, 0.2);
}

.quoted-author {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 4px;
}

.quoted-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── IMAGES ── */
.tweet-images {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tweet-images img {
    max-height: 160px;
    max-width: 100%;
    object-fit: cover;
    border: 1px solid var(--rule);
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.tweet-images img:hover {
    opacity: 0.85;
}

/* ── ARTICLE CARD ── */
.article-card {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    border: 1px solid var(--rule);
    background: rgba(200, 191, 173, 0.15);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.article-card:hover {
    border-color: var(--gold);
    background: rgba(201, 151, 58, 0.08);
}

.article-card-cover {
    flex-shrink: 0;
    width: 110px;
    min-height: 80px;
    object-fit: cover;
    display: block;
}

.article-card-body {
    padding: 10px 12px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.article-card-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

.article-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-summary {
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .article-card-cover {
        width: 80px;
    }
}

/* ── LIGHTBOX ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 4, 0.92);
    z-index: 9000;
    justify-content: center;
    align-items: center;
    animation: lbFadeIn 0.2s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes lbFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border: 1px solid rgba(200, 191, 173, 0.3);
    animation: lbSlideIn 0.2s ease;
}

@keyframes lbSlideIn {
    from {
        transform: scale(0.94);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    color: #c8bfad;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    transition: color 0.15s;
}

.lightbox-close:hover {
    color: #fff;
}

.lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #c8bfad;
    font-size: 32px;
    cursor: pointer;
    padding: 12px 18px;
    user-select: none;
    transition: color 0.15s;
}

.lightbox-arrow:hover {
    color: #fff;
}

.lightbox-arrow.prev {
    left: 12px;
}

.lightbox-arrow.next {
    right: 12px;
}

.lightbox-arrow.hidden {
    visibility: hidden;
}

.lightbox-counter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #7a6e5f;
    letter-spacing: 2px;
}

/* ── STATE ── */
.state-box {
    text-align: center;
    padding: 60px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
}

.state-box .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

/* ── FOOTER ── */
.footer {
    border-top: 3px double var(--rule);
    padding-top: 20px;
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.footer-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.footer-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.7;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.masthead {
    animation: fadeUp 0.5s ease both;
}

.date-nav {
    animation: fadeUp 0.5s 0.05s ease both;
}

.section-header {
    animation: fadeUp 0.5s 0.10s ease both;
}

.blogger-card {
    animation: fadeUp 0.4s ease both;
}

@media (max-width: 600px) {
    body {
        padding: 28px 18px;
    }

    .masthead h1 {
        font-size: 36px;
    }

    .blogger-header {
        flex-direction: column;
        gap: 8px;
    }

    .blogger-stats {
        text-align: left;
    }

    .footer {
        flex-direction: column;
    }
}
