/* =========================================================
   万福桥的日常记录 — 站点样式
   设计：温柔 · 日系 · 慢生活
   ========================================================= */

:root {
    --paper:        #f7f5f1;
    --paper-2:      #efeae2;
    --card:         #fffdfa;
    --ink:          #23211e;
    --ink-soft:     #5c574f;
    --muted:        #948d83;
    --accent:       #3f6f5b;
    --accent-2:     #6f9c7f;
    --line:         #e7e1d8;
    --shadow:       0 24px 60px -30px rgba(35, 32, 28, 0.45);
    --shadow-sm:    0 10px 30px -20px rgba(35, 32, 28, 0.4);
    --radius:       22px;
    --radius-sm:    14px;
    --maxw:         780px;
    --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-serif:   Georgia, "Songti SC", "SimSun", "Noto Serif SC", serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper:    #1b1a18;
        --paper-2:  #232220;
        --card:     #242220;
        --ink:      #ece7df;
        --ink-soft: #b9b2a7;
        --muted:    #807a70;
        --accent:   #8fc4a8;
        --accent-2: #6f9c7f;
        --line:     #35322e;
        --shadow:   0 24px 60px -30px rgba(0, 0, 0, 0.8);
        --shadow-sm:0 10px 30px -20px rgba(0, 0, 0, 0.7);
    }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
}
a:hover { color: var(--accent-2); }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 22px;
}

/* ===================== 首屏 ===================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 90px 22px 120px;
    color: #fff;
    overflow: hidden;
    background: #2a2a2a center/cover no-repeat url("../../bg.jpg");
    animation: heroFade 1.4s ease both;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(20,20,20,0.55) 0%, rgba(20,20,20,0.25) 45%, rgba(20,20,20,0.75) 100%);
}

.hero > * { position: relative; z-index: 1; }

@keyframes heroFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.35));
    box-shadow: 0 18px 40px -12px rgba(0,0,0,0.6);
    margin-bottom: 26px;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.avatar:hover { transform: scale(1.06) rotate(3deg); }
.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(30px, 6vw, 46px);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
    text-shadow: 0 3px 22px rgba(0,0,0,0.4);
}

.hero-sub {
    font-size: clamp(15px, 2.6vw, 18px);
    letter-spacing: 0.14em;
    opacity: 0.92;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.scroll-cue {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    width: 24px;
    height: 38px;
    border: 1.5px solid rgba(255,255,255,0.7);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 7px;
}
.scroll-cue::before {
    content: "";
    width: 3px;
    height: 8px;
    border-radius: 3px;
    background: rgba(255,255,255,0.9);
    animation: cue 1.8s cubic-bezier(0.4,0,0.2,1) infinite;
}
@keyframes cue {
    0%   { opacity: 0; transform: translateY(-3px); }
    40%  { opacity: 1; }
    80%  { opacity: 0; transform: translateY(10px); }
    100% { opacity: 0; }
}

/* ===================== 正文区 ===================== */
main {
    position: relative;
    z-index: 5;
    margin-top: -70px;
    padding: 78px 0 64px;
    background: var(--paper);
    border-radius: 34px 34px 0 0;
    box-shadow: 0 -30px 60px -40px rgba(0,0,0,0.5);
}

.section-label {
    font-size: 13px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    margin: 0 0 34px;
}
.section-label::after {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    margin: 14px auto 0;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.6;
}

/* 文章卡片 */
.post-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 38px 40px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.2,0.8,0.2,1),
                box-shadow 0.35s ease, border-color 0.35s ease;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.post-card h2 {
    font-family: var(--font-serif);
    font-size: 25px;
    line-height: 1.4;
    margin: 0 0 12px;
    letter-spacing: 0.02em;
}
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--accent); }

.post-meta {
    font-size: 13.5px;
    color: var(--muted);
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}
.post-meta span + span::before {
    content: "·";
    margin: 0 10px;
    opacity: 0.6;
}

.post-excerpt {
    color: var(--ink-soft);
    margin: 0 0 24px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
}
.read-more .arrow { transition: transform 0.3s ease; }
.post-card:hover .read-more .arrow { transform: translateX(5px); }

/* 关于卡片 */
.about {
    margin-top: 40px;
    padding: 32px 36px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, transparent, rgba(63,111,91,0.04));
}
.about h3 {
    font-family: var(--font-serif);
    font-size: 19px;
    margin: 0 0 10px;
}
.about p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
}

/* ===================== 文章页 ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--paper);
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}
.site-title a {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 17px;
    color: var(--ink);
    letter-spacing: 0.03em;
}
.back-link {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.back-link .arrow { transition: transform 0.3s ease; }
.back-link:hover .arrow { transform: translateX(-4px); }

.article-wrap { padding: 56px 0 64px; }

.article {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 56px 58px 50px;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-align: center;
    margin: 0 0 16px;
}

.article-byline {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 40px;
}
.article-byline span + span::before {
    content: "·";
    margin: 0 10px;
    opacity: 0.6;
}

.article-body {
    font-family: var(--font-serif);
    font-size: 17.5px;
    line-height: 2.05;
    color: var(--ink);
}
.article-body p { margin: 0 0 1.5em; }
.article-body p:first-of-type::first-letter {
    font-size: 2.6em;
    line-height: 1;
    float: left;
    padding: 6px 12px 0 0;
    color: var(--accent);
    font-weight: 700;
}
.article-tail {
    margin-top: 46px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.2em;
}

/* ===================== 页脚 ===================== */
footer {
    border-top: 1px solid var(--line);
    background: var(--paper-2);
    padding: 46px 0 40px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
footer .container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
footer .brand {
    font-family: var(--font-serif);
    color: var(--ink-soft);
    letter-spacing: 0.05em;
}
footer .icp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
footer .icp svg { flex: none; opacity: 0.75; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

/* ===================== 响应式 ===================== */
@media (max-width: 640px) {
    main { margin-top: -50px; padding: 54px 0 46px; border-radius: 26px 26px 0 0; }
    .post-card { padding: 28px 24px; }
    .post-card h2 { font-size: 21px; }
    .article { padding: 34px 24px; border-radius: 18px; }
    .article-body { font-size: 16.5px; line-height: 1.95; }
    .article-wrap { padding: 34px 0 48px; }
    .about { padding: 26px 24px; }
    .avatar { width: 108px; height: 108px; }
}

/* 尊重「减少动态效果」系统设置 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
