/* =============================================================
 * timeline-v090.css — 艺术历程 v0.9
 * "水墨长卷" — 浅色宣纸 + 暗金 + 垂直时间线
 * 触屏友好：44px+ 目标，搜索 + 抽屉筛选
 * ============================================================= */

/* ---------- 主题变量（浅色宣纸） ---------- */
:root {
    --tl-bg:        #f8f4ec;   /* 宣纸米黄 */
    --tl-bg-soft:   #fffcf3;   /* 卡底 */
    --tl-bg-hover:  #f1ecdf;   /* hover */
    --tl-ink:       #2a2520;   /* 主文字 深褐 */
    --tl-ink-soft:  #5a5045;   /* 副文字 */
    --tl-ink-mute:  #8a7e6a;   /* 静默文字 */
    --tl-line:      rgba(42,37,32,0.12);   /* 分隔线 */
    --tl-line-soft: rgba(42,37,32,0.06);
    --tl-gold:      #c9a962;   /* 暗金 主色 */
    --tl-gold-soft: rgba(201,169,98,0.18);
    --tl-gold-deep: #8a6d2c;   /* 深金 */

    /* 4 分类色（水墨淡彩：低饱和、雅致） */
    --cat-honor:     #b89554;  /* 赭金 */
    --cat-creation:  #7a8a6b;  /* 花青绿 */
    --cat-exhibition:#6b8aa3;  /* 花青蓝 */
    --cat-position:  #a37a5a;  /* 朱砂褐 */

    /* 字体 */
    --font-cn: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
    --font-en: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
}

/* ---------- Body 基础（含宣纸肌理） ---------- */
.tl-body {
    background-color: #f8f4ec;
    /* 宣纸肌理：两层 SVG noise 叠加 + 极淡径向光晕 */
    background-image:
        radial-gradient(ellipse at top, rgba(201,169,98,0.07), transparent 60%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
    background-size: auto, 180px 180px, 400px 400px;
    background-blend-mode: normal, multiply, normal;
    color: var(--tl-ink);
    font-family: var(--font-cn);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Hero：长卷题首（极致紧凑 + 主体突出） ---------- */
/* 重要：hero padding-top 必须让出 navbar 高度（约 76-84px 视视口） */
.tl-hero {
    text-align: center;
    padding: 140px 24px 24px;
    border-bottom: 1px solid var(--tl-line);
    background:
        radial-gradient(ellipse at top, rgba(201,169,98,0.10), transparent 60%),
        var(--tl-bg);
    position: relative;
}
/* hero 顶部加 iOS 风格"灵动岛"渐变到透明，让 nav 跟 hero 过渡更柔和 */
.tl-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom,
        rgba(248, 244, 236, 0.7) 0%,
        rgba(248, 244, 236, 0.3) 50%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
}
.tl-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* eyebrow：英文小标（固定显示，不被 i18n 切换） */
.tl-hero-eyebrow {
    font-family: var(--font-en);
    font-style: italic;
    font-size: 0.88rem;
    color: #5a4a25;
    letter-spacing: 0.32em;
    margin: 0 0 4px;
    text-transform: uppercase;
    font-weight: 500;
}

/* 主体 — "艺术历程" 4 字 */
.tl-hero-title {
    font-family: var(--font-cn);
    font-size: 3.2rem;
    font-weight: 500;
    color: var(--tl-ink);
    margin: 0 0 4px;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    line-height: 1.1;
}

/* 副标题 — 紧贴主体 */
.tl-hero-sub {
    font-family: var(--font-en);
    font-style: italic;
    color: #6a5e4a;
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    margin: 0;
    font-weight: 400;
}

/* ---------- 工具栏（iOS 毛玻璃） ---------- */
.tl-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 32px 56px;
}

/* 工具栏：玻璃感容器 */
.tl-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 10px;
    background: rgba(255, 252, 244, 0.42);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(201, 169, 98, 0.18);
    border-radius: 22px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 6px 24px -8px rgba(42, 37, 32, 0.08);
}

/* 搜索 */
.tl-search-wrap {
    position: relative;
    flex: 1 1 280px;
    min-width: 0;
}
.tl-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tl-ink-mute);
    pointer-events: none;
}
#tl-search {
    width: 100%;
    height: 44px;
    padding: 0 18px 0 46px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(201, 169, 98, 0.18);
    border-radius: 20px;
    color: var(--tl-ink);
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
}
#tl-search:focus {
    border-color: var(--tl-gold);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.12);
}
#tl-search::placeholder { color: var(--tl-ink-mute); }

/* 筛选 chips（玻璃胶囊） */
.tl-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tl-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(201, 169, 98, 0.18);
    border-radius: 20px;
    color: var(--tl-ink-soft);
    font-family: inherit;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.tl-chip:hover {
    border-color: var(--tl-gold);
    color: var(--tl-ink);
    background: rgba(255, 255, 255, 0.7);
}
.tl-chip.active {
    background: var(--tl-ink);
    color: var(--tl-bg);
    border-color: var(--tl-ink);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    box-shadow: 0 4px 14px -4px rgba(42, 37, 32, 0.4);
}
.tl-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 抽屉触发（仅 ≤1024px 显示） */
.tl-filters-toggle {
    display: none;
    width: 48px;
    height: 48px;
    background: var(--tl-bg-soft);
    border: 1px solid var(--tl-line);
    border-radius: 24px;
    color: var(--tl-ink-soft);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.tl-filters-toggle:hover { border-color: var(--tl-gold); color: var(--tl-ink); }

/* stats：玻璃感 chip */
.tl-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tl-ink-soft);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    margin: 4px 0 24px;
    padding: 6px 14px;
    font-family: var(--font-en);
    font-style: italic;
    text-transform: uppercase;
    background: rgba(255, 252, 244, 0.5);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(201, 169, 98, 0.18);
    border-radius: 18px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

/* ---------- 时间线主体（紧凑） ---------- */
.tl-timeline {
    position: relative;
    padding-left: 110px;
}

/* 中央垂直线 */
.tl-timeline::before {
    content: '';
    position: absolute;
    left: 94px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--tl-gold-soft) 8%, var(--tl-gold-soft) 92%, transparent);
}

.tl-year-group {
    position: relative;
    margin-bottom: 24px;
}
.tl-year-group:last-child { margin-bottom: 0; }

/* 年份大字（左侧 sticky — 滚动时吸在顶部，年代不丢） */
.tl-year-pin {
    position: sticky;
    top: 96px;
    align-self: flex-start;
    width: 80px;
    margin-left: -110px;
    text-align: right;
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--tl-gold-deep);
    letter-spacing: 0.02em;
    line-height: 1.2;
    font-weight: 500;
    z-index: 2;
}

/* 年份旁的圆点 */
.tl-year-group::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tl-gold);
    border: 2px solid var(--tl-bg);
    box-shadow: 0 0 0 1px var(--tl-gold);
}

/* 单条事件（紧凑） */
.tl-item {
    position: relative;
    margin-bottom: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.tl-item:last-child { margin-bottom: 0; }

.tl-item-card {
    /* iOS 毛玻璃卡片：半透明白 + 背景模糊 + 细金边 + 极弱阴影 */
    background: rgba(255, 252, 244, 0.55);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(201, 169, 98, 0.16);
    border-radius: 10px;
    padding: 11px 16px;
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 2px 8px -2px rgba(42, 37, 32, 0.04);
}
.tl-item-card:hover {
    border-color: var(--tl-gold);
    background: rgba(255, 252, 244, 0.78);
    transform: translateX(2px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 6px 20px -4px rgba(42, 37, 32, 0.12);
}

.tl-item-text {
    flex: 1;
    min-width: 0;
    color: var(--tl-ink);
    font-size: 0.9rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* 分类 tag（紧凑） */
.tl-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 0.66rem;
    padding: 3px 9px;
    border-radius: 9px;
    color: #fff;
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-top: 1px;
    opacity: 0.92;
}
.tl-cat-tag::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
}

/* Pro 角标 */
.tl-pro-badge {
    display: inline-block;
    font-size: 0.62rem;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--tl-gold-soft);
    color: var(--tl-gold-deep);
    margin-left: 6px;
    letter-spacing: 0.1em;
    vertical-align: middle;
}

/* 空态 */
.tl-empty {
    text-align: center;
    color: var(--tl-ink-mute);
    padding: 60px 20px;
    font-family: var(--font-en);
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0.1em;
}
.tl-month {
    font-family: var(--font-en);
    font-style: italic;
    color: var(--tl-ink-mute);
    font-size: 0.78rem;
    margin-right: 6px;
    flex-shrink: 0;
}

/* ---------- 响应式 ---------- */

/* 平板 ≤1024：抽屉筛选 + 紧凑 */
@media (max-width: 1024px) {
    .tl-filters { display: none; }
    .tl-filters-toggle { display: inline-flex; }
    .tl-filters.open {
        display: flex;
        position: absolute;
        top: 56px;
        right: 32px;
        background: var(--tl-bg-soft);
        border: 1px solid var(--tl-line);
        border-radius: 12px;
        padding: 12px;
        z-index: 50;
        box-shadow: 0 8px 32px rgba(0,0,0,0.08);
        flex-direction: column;
        gap: 6px;
        min-width: 180px;
    }
    .tl-filters.open .tl-chip {
        width: 100%;
        justify-content: flex-start;
    }
    .tl-toolbar { position: relative; }
    .tl-main { padding: 24px 24px 48px; }
    .tl-timeline { padding-left: 90px; }
    .tl-timeline::before { left: 76px; }
    .tl-year-pin { left: -90px; width: 64px; font-size: 1.35rem; }
    .tl-year-group::before { left: -20px; width: 9px; height: 9px; }
    .tl-hero { padding: 130px 24px 32px; }
    .tl-hero-title { font-size: 2.4rem; letter-spacing: 0.32em; text-indent: 0.32em; }
    .tl-hero-eyebrow { font-size: 0.82rem; letter-spacing: 0.26em; }
    .tl-hero-sub { font-size: 0.85rem; }
}

/* 手机 ≤640：单列，年份大字 + sticky（与桌面体验一致） */
@media (max-width: 640px) {
    .tl-body { background-attachment: scroll, scroll, scroll; }

    .tl-main { padding: 20px 16px 48px; }
    .tl-timeline {
        padding-left: 0;
    }
    .tl-timeline::before { display: none; }

    /* 年份：sticky 到 nav 下方，毛玻璃 + 暗金小圆点 */
    .tl-year-pin {
        position: sticky;
        top: 88px;                 /* 让出 nav 高度（mobile 约 70px + 18px buffer） */
        z-index: 5;
        /* iOS 毛玻璃：半透明白 + 模糊（不是 backdrop-filter 父级，是元素自身背景模糊） */
        background: rgba(255, 252, 244, 0.72);
        backdrop-filter: blur(20px) saturate(170%);
        -webkit-backdrop-filter: blur(20px) saturate(170%);
        width: auto;
        text-align: left;
        font-size: 1.75rem;        /* 加大字号，"大标签"视觉 */
        margin: 0 0 12px;
        padding: 10px 14px 8px;
        color: var(--tl-ink);
        font-family: var(--font-en);
        font-weight: 500;
        letter-spacing: 0.05em;
        border: 1px solid rgba(201, 169, 98, 0.22);
        border-radius: 14px;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 4px 16px -4px rgba(42, 37, 32, 0.08);
    }
    .tl-year-pin::before {
        content: '';
        display: inline-block;
        width: 6px; height: 6px;
        border-radius: 50%;
        background: var(--accent);
        margin-right: 10px;
        vertical-align: middle;
    }
    .tl-year-group {
        margin-bottom: 28px;
        padding-bottom: 4px;
    }
    .tl-year-group:last-child { border-bottom: none; }
    .tl-year-group::before { display: none; }
    .tl-item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
    }
    .tl-item-text { font-size: 0.88rem; }
    .tl-cat-tag { font-size: 0.62rem; padding: 2px 8px; }

    .tl-hero {
        padding: 110px 20px 20px;   /* 110 让出 hamburger nav 高度 + lang/pro 按钮 */
    }
    .tl-hero-eyebrow {
        font-size: 0.7rem;
        letter-spacing: 0.22em;
        margin: 0 0 4px;
    }
    .tl-hero-title {
        font-size: 1.7rem;
        letter-spacing: 0.18em;
        text-indent: 0.18em;
        margin: 0 0 4px;
    }
    .tl-hero-sub {
        font-size: 0.78rem;
        letter-spacing: 0.06em;
    }

    /* 工具栏在 mobile 全宽 */
    .tl-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
    .tl-search-wrap { flex: 1 1 auto; }
    .tl-filters-toggle { display: inline-flex; align-self: flex-end; }
    .tl-filters.open {
        right: 16px;
        top: 52px;
        min-width: 160px;
    }

    .tl-stats { font-size: 0.7rem; margin: 0 0 16px; }
}

/* 小手机 ≤400：hero 进一步压 */
@media (max-width: 400px) {
    .tl-hero { padding: 100px 16px 16px; }
    .tl-hero-title { font-size: 1.45rem; letter-spacing: 0.14em; text-indent: 0.14em; }
    .tl-hero-eyebrow { font-size: 0.66rem; }
    .tl-hero-sub { font-size: 0.72rem; }
}

/* 触屏：禁 hover-only */
@media (hover: none) {
    .tl-item-card:hover {
        border-color: var(--tl-line);
        background: var(--tl-bg-soft);
        transform: none;
    }
    .tl-item:active .tl-item-card {
        border-color: var(--tl-gold);
        background: var(--tl-bg-hover);
    }
    .tl-chip:hover { border-color: var(--tl-line); color: var(--tl-ink-soft); }
    .tl-chip.active:hover { background: var(--tl-ink); color: var(--tl-bg); }
}
