/* ===== Gavin AI 左侧导航布局 ===== */
:root {
    --accent: #3a3f51;
    --accent-hover: #2b2f3e;
    --line: #ebedf0;
}

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: #fff;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    letter-spacing: 0.01em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.app { display: flex; min-height: 100vh; }

/* ---- 左侧导航 ---- */
.side-nav {
    width: 240px;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    background: #fafbfc;
    border-right: 1px solid var(--line);
    padding: 26px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.brand { font-size: 20px; font-weight: 700; padding: 4px 10px 22px; letter-spacing: -0.02em; }
.brand a { color: #1a1a1a; }
.nav-label { font-size: 13px; color: #9aa0a6; padding: 0 10px 8px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 8px;
    color: #555; font-size: 15px; line-height: 1;
    cursor: pointer; user-select: none;
}
.nav-item:hover { background: #eef0f3; color: #222; }
.nav-item.active { background: #e9edf2; color: #1a1a1a; font-weight: 600; }
.nav-item .ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item .chev { width: 16px; height: 16px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 1.7; }
details.nav-group > summary { list-style: none; }
details.nav-group > summary::-webkit-details-marker { display: none; }
details.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-sub { display: flex; flex-direction: column; margin: 2px 0 2px 26px; }
.nav-sub-item { padding: 8px 12px; border-radius: 6px; color: #6b7075; font-size: 14px; }
.nav-sub-item:hover { background: #eef0f3; color: #222; }
.side-foot { margin-top: auto; padding: 18px 10px 0; font-size: 12px; color: #b3b8be; }

/* ---- 主内容 ---- */
.content { margin-left: 240px; flex: 1; min-width: 0; padding: 46px 56px; max-width: 860px; }

.post { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid #eef0f2; }
.post:last-child { border-bottom: none; }
.post-title { font-size: 1.5em; margin: 0 0 10px; line-height: 1.4; font-weight: 700; }
.post-title a { color: #1a1a1a; }
.post-title a:hover { color: var(--accent); }
.post-meta { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 16px; color: #9aa0a6; font-size: 13px; }
.post-meta a { color: #9aa0a6; }
.post-content { color: #333; line-height: 1.85; }
.post-content h2 { border-left: 4px solid var(--accent); padding-left: 12px; margin-top: 1.6em; font-size: 1.22em; color: #1f232b; }
.post-content h3 { color: #2b2f3e; }
.post-content blockquote { border-left: 4px solid var(--accent); background: #f7f8fa; margin: 1em 0; padding: 8px 16px; color: #555; }
.post-content code { background: #f2f3f5; padding: 2px 6px; border-radius: 4px; color: #b94a48; font-size: 0.9em; }
.post-content img { max-width: 100%; height: auto; border-radius: 6px; }

.page-title { font-size: 1.7em; margin: 0 0 24px; color: #1a1a1a; }
.archive-month { margin: 26px 0 10px; color: var(--accent); font-size: 1.05em; }
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li { padding: 8px 0; display: flex; gap: 14px; border-bottom: 1px dashed #eef0f2; }
.archive-list time { color: #9aa0a6; font-size: 13px; width: 44px; flex-shrink: 0; }
.archive-list a { color: #333; }
.archive-list a:hover { color: var(--accent); }
.tags { color: #9aa0a6; font-size: 13px; margin-top: 22px; }
.post-near { list-style: none; padding: 16px 0; margin: 0; display: flex; flex-wrap: wrap; gap: 30px; color: #9aa0a6; font-size: 14px; }

/* ---- 响应式 ---- */
@media (max-width: 820px) {
    .app { flex-direction: column; }
    .side-nav {
        position: static; width: auto; border-right: none;
        border-bottom: 1px solid var(--line); padding: 14px 16px;
        flex-direction: row; flex-wrap: wrap; align-items: center;
    }
    .brand { padding: 0 12px 0 4px; }
    .nav-label, .side-foot { display: none; }
    .nav-list { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    details.nav-group { position: relative; }
    .nav-sub {
        position: absolute; left: 0; top: 100%; z-index: 20;
        background: #fff; border: 1px solid var(--line); border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,.08); min-width: 150px; margin: 6px 0 0; padding: 6px;
    }
    .content { margin-left: 0; padding: 24px 18px; max-width: 100%; }
}
/* ===== 归档时间线 ===== */
.archive-header { margin-bottom: 6px; }
.archive-title { font-size: 1.9em; margin: 0 0 8px; color: #1a1a1a; }
.archive-sub { color: #9aa0a6; font-size: 14px; margin: 0 0 8px; }

.tl { position: relative; margin-top: 32px; padding-bottom: 8px; }
.tl::before { content: ''; position: absolute; left: 84px; top: 8px; bottom: 8px; width: 2px; background: #eceff2; }
.tl-month { position: relative; padding-left: 0; margin: 26px 0 16px; z-index: 2; }
.tl-month:first-child { margin-top: 0; }
.tl-badge { display: inline-block; padding: 4px 15px; border-radius: 15px; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .02em; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.tl-item { position: relative; padding-left: 104px; margin-bottom: 15px; }
.tl-day { position: absolute; left: 0; top: 12px; width: 70px; text-align: right; color: #9aa0a6; font-size: 13px; }
.tl-dot { position: absolute; left: 78px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #c5cbd3; box-sizing: content-box; }
.tl-card { display: block; padding: 13px 18px; border-radius: 10px; color: #fff; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: filter .15s, transform .15s; }
.tl-card:hover { filter: brightness(1.07); transform: translateY(-1px); color: #fff; }
.tl-card-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.55; }
.tl-card-ex { display: block; margin-top: 4px; font-size: 13px; line-height: 1.55; opacity: .88; }

@media (max-width: 820px) {
    .tl::before { left: 54px; }
    .tl-month { padding-left: 0; }
    .tl-item { padding-left: 68px; }
    .tl-day { width: 38px; font-size: 12px; }
    .tl-dot { left: 46px; }
}
/* ===== 卡片式文章列表 ===== */
body { background: #f3f4f6; }

.post-list { display: flex; flex-direction: column; gap: 18px; }
.post-card { background: #fff; border: 1px solid #eceef1; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); transition: box-shadow .18s ease, transform .18s ease; }
.post-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.09); transform: translateY(-2px); }
.post-card-imglink { display: block; line-height: 0; }
.post-card-img { display: block; width: 100%; max-height: 280px; object-fit: cover; }
.post-card-body { padding: 20px 22px 18px; }
.post-card-title { font-size: 1.28em; font-weight: 700; margin: 0 0 10px; line-height: 1.45; }
.post-card-title a { color: #1a1a1a; }
.post-card-title a:hover { color: #3a3f51; }
.post-card-excerpt { color: #6b7075; font-size: 14px; line-height: 1.7; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-foot { display: flex; align-items: center; gap: 20px; color: #9aa0a6; font-size: 13px; padding-top: 12px; border-top: 1px solid #f1f3f5; }
.post-card-foot svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; margin-right: 5px; }
.post-card-foot .pc-author, .post-card-foot .pc-date { display: inline-flex; align-items: center; }
.archive-title { color: #1a1a1a; margin: 0 0 18px; }

.single-card { background: #fff; border: 1px solid #eceef1; border-radius: 12px; padding: 30px 34px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.single-card .post-title { margin-top: 0; }

@media (max-width: 820px) {
    .single-card { padding: 20px 16px; }
    .post-card-body { padding: 16px; }
}
/* ===== 侧栏品牌：圆形 Logo + 站名(带下拉箭头) ===== */
.brand { display: flex; flex-direction: column; align-items: center; padding: 8px 0 22px; }
.brand-logo-link { display: block; margin-bottom: 10px; line-height: 0; }
.brand-logo { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.brand-mono {
    display: flex; align-items: center; justify-content: center;
    width: 78px; height: 78px; border-radius: 50%;
    background: #1a1a1a; color: #fff;
    font-size: 36px; font-weight: 700;
    font-family: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}
.brand-name {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 16px; font-weight: 600; color: #333; text-decoration: none;
}
.brand-name:hover { color: #3a3f51; }
.brand-caret { fill: none; stroke: #9aa0a6; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 820px) {
    .brand { flex-direction: row; align-items: center; padding: 0 12px 0 4px; gap: 8px; }
    .brand-logo-link { margin-bottom: 0; }
    .brand-logo, .brand-mono { width: 34px; height: 34px; font-size: 17px; box-shadow: none; }
    .brand-name { font-size: 15px; }
}
