/* 我的小天地 - 个人主页样式 */

:root {
    --c-main: #4a7c59;
    --c-main-dark: #3a6447;
    --c-main-light: #edf3ee;
    --c-warm: #c98a25;
    --c-warm-light: #fdf5e6;
    --c-text: #2b2f33;
    --c-text-2: #5c6670;
    --c-text-3: #8d949c;
    --c-line: #e6e9ec;
    --c-bg: #fbfaf7;
    --c-paper: #ffffff;
    --radius: 10px;
    --wrap: 1120px;
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-main); }
ul, ol { list-style: none; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航 ========== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--c-line);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }

.logo-mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: var(--c-main);
    color: #fff;
    font-size: 18px;
    border-radius: 50%;
}

.logo-text { line-height: 1.25; }
.logo-text strong { display: block; font-size: 18px; letter-spacing: .5px; }
.logo-text em {
    display: block;
    font-style: normal;
    font-size: 10px;
    color: var(--c-text-3);
    letter-spacing: 2px;
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
    padding: 7px 14px;
    font-size: 14.5px;
    color: var(--c-text-2);
    border-radius: 20px;
    transition: all .18s;
}
.nav a:hover { color: var(--c-main); background: var(--c-main-light); }
.nav a.cur { color: var(--c-main); font-weight: 600; background: var(--c-main-light); }

/* ========== Hero ========== */
.hero {
    background:
        radial-gradient(900px 380px at 50% -30%, #f3efe6 0%, rgba(243, 239, 230, 0) 70%),
        linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
    border-bottom: 1px solid var(--c-line);
    padding: 52px 0 46px;
    text-align: center;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    width: 84px; height: 84px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, var(--c-main), var(--c-main-dark));
    color: #fff;
    font-size: 34px;
    border-radius: 50%;
    box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--c-line);
    margin-bottom: 22px;
}

.hero-text h1 {
    font-size: 34px;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.hero-slogan {
    font-size: 15.5px;
    color: var(--c-text-2);
    max-width: 540px;
    margin: 0 auto 22px;
}

.hero-tags { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.hero-tags li {
    font-size: 12.5px;
    color: var(--c-main);
    background: var(--c-main-light);
    border: 1px solid #dde9e1;
    padding: 3px 13px;
    border-radius: 20px;
}

.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 24px;
    font-size: 14.5px;
    transition: all .2s;
}
.btn-primary { background: var(--c-main); color: #fff; border: 1px solid var(--c-main); }
.btn-primary:hover { background: var(--c-main-dark); border-color: var(--c-main-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--c-main); border: 1px solid #d9e3dd; }
.btn-ghost:hover { border-color: var(--c-main); background: var(--c-main-light); }

/* ========== 布局 ========== */
.layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    align-items: start;
    padding: 44px 20px 60px;
}

.col-main { min-width: 0; }
.col-side { min-width: 0; }

/* ========== 区块 ========== */
.block {
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 30px 32px;
    margin-bottom: 26px;
}

.block-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--c-line);
}
.block-head h2 {
    font-size: 20px;
    font-weight: 600;
    position: relative;
    padding-left: 13px;
}
.block-head h2::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 17px;
    background: var(--c-main);
    border-radius: 3px;
}
.block-sub { font-size: 12.5px; color: var(--c-text-3); }

/* ========== 文章列表 ========== */
.post {
    display: flex;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px dashed #eef0f2;
}
.post:last-child { border-bottom: 0; padding-bottom: 4px; }

.post-date {
    flex: 0 0 58px;
    text-align: center;
    height: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--c-main-light);
    border-radius: 8px;
}
.post-date b { font-size: 21px; color: var(--c-main); line-height: 1.1; }
.post-date span { font-size: 10.5px; color: var(--c-text-3); }

.post-body { flex: 1; min-width: 0; }
.post-body h3 { font-size: 17.5px; margin-bottom: 8px; font-weight: 600; }
.post-body h3 a { color: var(--c-text); }
.post-body h3 a:hover { color: var(--c-main); }
.post-excerpt {
    font-size: 14px;
    color: var(--c-text-2);
    line-height: 1.85;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    display: flex;
    gap: 18px;
    font-size: 12.5px;
    color: var(--c-text-3);
}
.post-meta .cat { color: var(--c-main); }

/* ========== 时间线 ========== */
.timeline { padding-top: 18px; padding-left: 6px; }
.timeline li {
    position: relative;
    padding: 0 0 20px 26px;
    border-left: 1px solid var(--c-line);
}
.timeline li:last-child { border-left: 0; padding-bottom: 0; }
.tl-dot {
    position: absolute;
    left: -5px; top: 8px;
    width: 9px; height: 9px;
    background: var(--c-main);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--c-line);
}
.timeline time {
    display: block;
    font-size: 12.5px;
    color: var(--c-text-3);
    margin-bottom: 3px;
    font-variant-numeric: tabular-nums;
}
.timeline p { font-size: 14.5px; color: var(--c-text-2); }

/* ========== 收藏 ========== */
.fav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-top: 20px; }
.fav {
    background: var(--c-warm-light);
    border: 1px solid #f0e3c6;
    border-radius: 8px;
    padding: 18px 20px;
}
.fav h3 {
    font-size: 14.5px;
    color: var(--c-warm);
    margin-bottom: 10px;
    font-weight: 600;
}
.fav li {
    font-size: 13.5px;
    color: var(--c-text-2);
    padding: 4px 0;
    border-bottom: 1px dashed #f2e8d3;
}
.fav li:last-child { border-bottom: 0; }
.fav em { font-style: normal; font-size: 12px; color: var(--c-text-3); margin-left: 4px; }

/* ========== 关于 ========== */
.about-card { padding-top: 20px; }
.about-card p { font-size: 14.5px; color: var(--c-text-2); margin-bottom: 14px; }
.about-card b { color: var(--c-text); }

.about-info {
    margin-top: 22px;
    padding: 18px 24px 6px;
    background: var(--c-main-light);
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 24px;
}
.about-info dt { font-size: 13px; color: var(--c-text-3); padding-top: 8px; }
.about-info dd { font-size: 14.5px; color: var(--c-text); font-weight: 500; padding-bottom: 8px; }

/* ========== 侧栏 ========== */
.widget {
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.widget h3 {
    font-size: 15px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--c-line);
    font-weight: 600;
}

.card-me { text-align: center; padding-top: 18px; }
.card-avatar {
    width: 58px; height: 58px;
    margin: 0 auto 12px;
    display: grid; place-items: center;
    background: var(--c-main);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
}
.card-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.card-desc { font-size: 13px; color: var(--c-text-3); line-height: 1.7; margin-bottom: 14px; }
.card-stat {
    display: flex;
    justify-content: center;
    gap: 18px;
    font-size: 12.5px;
    color: var(--c-text-3);
    padding-top: 14px;
    border-top: 1px dashed #eee;
}
.card-stat b { color: var(--c-main); font-size: 15px; margin: 0 3px 0 0; }

.cat-list { padding-top: 10px; }
.cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--c-text-2);
    border-bottom: 1px dashed #f0f1f3;
}
.cat-list li:last-child a { border-bottom: 0; }
.cat-list b {
    font-size: 12px;
    color: var(--c-text-3);
    background: var(--c-main-light);
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 400;
}

.recent-list { padding-top: 12px; }
.recent-list li {
    padding: 9px 0;
    border-bottom: 1px dashed #f0f1f3;
}
.recent-list li:last-child { border-bottom: 0; }
.recent-list a {
    display: block;
    font-size: 13.8px;
    color: var(--c-text-2);
    line-height: 1.6;
    margin-bottom: 2px;
}
.recent-list time { font-size: 11.5px; color: var(--c-text-3); }

.widget-tip {
    padding-top: 14px;
    font-size: 13px;
    color: var(--c-text-3);
    line-height: 1.8;
}

/* ========== 页脚 ========== */
.footer {
    background: #26292c;
    color: #9aa0a6;
    padding: 40px 0 30px;
    font-size: 13.5px;
}
.footer-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid #33373b;
}
.footer-links a { color: #9aa0a6; }
.footer-links a:hover { color: #fff; }

.footer-decl {
    padding: 18px 0 20px;
    color: #7c8288;
    line-height: 1.85;
    font-size: 13px;
}

.footer-copy {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid #33373b;
    color: #7c8288;
}
.icp a {
    color: #9aa0a6;
    border-bottom: 1px dotted #5b6066;
    padding-bottom: 1px;
}
.icp a:hover { color: #fff; border-color: #fff; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .col-side { order: -1; }
}

@media (max-width: 720px) {
    .topbar-inner { height: auto; padding: 14px 0; flex-direction: column; align-items: flex-start; gap: 10px; }
    .nav { margin-left: -8px; }
    .hero { padding: 36px 0; }
    .hero-text h1 { font-size: 26px; }
    .block { padding: 24px 20px; }
    .fav-grid { grid-template-columns: 1fr; }
    .post { gap: 14px; }
    .post-date { flex: 0 0 50px; height: 50px; }
    .post-meta { gap: 12px; font-size: 12px; }
    .about-info { grid-template-columns: 1fr; gap: 0; }
    .about-info dt { padding-bottom: 2px; }
    .about-info dd { padding-bottom: 12px; border-bottom: 1px dashed #dde5df; }
    .about-info dd:last-of-type { border-bottom: 0; }
    .footer-copy { flex-direction: column; align-items: flex-start; }
}
