/*
Theme Name: Kadence Child - appearhome
Template: kadence
Version: 2.0.0
Description: appearhome - 简约博客主题
*/

/* ========== CSS Variables ========== */
/* ========== CSS Variables ========== */
:root,
[data-theme="light"] {
    --bg: #F5F5F0;
    --bg-card: #FFFFFF;
    --bg-soft: #EDEDE8;
    --text: #2A2A2A;
    --text-muted: #8A8A85;
    --text-light: #B2B2AC;
    --accent: #C57060;
    --accent-soft: rgba(197,112,96,0.08);
    --border: #E0E0DA;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.06);
    --font-serif: 'Georgia','Noto Serif SC',serif;
    --font-sans: -apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
    --max-width: 800px;
}

/* ===== 背景跟随主题 — 全覆盖 Kadence 所有层级 ===== */
[data-theme="light"] body,
[data-theme="light"] .site,
[data-theme="light"] #wrapper,
[data-theme="light"] #inner-wrap,
[data-theme="light"] .site-container,
[data-theme="light"] .content-area,
[data-theme="light"] .content-container,
[data-theme="light"] .entry-content-wrap,
[data-theme="light"] .entry-content,
[data-theme="light"] .entry-hero,
[data-theme="light"] .hero-section-overlay,
[data-theme="light"] .page-header {
    background-color: #F5F5F0 !important;
}
[data-theme="dark"] body,
[data-theme="dark"] .site,
[data-theme="dark"] #wrapper,
[data-theme="dark"] #inner-wrap,
[data-theme="dark"] .site-container,
[data-theme="dark"] .content-area,
[data-theme="dark"] .content-container,
[data-theme="dark"] .entry-content-wrap,
[data-theme="dark"] .entry-content,
[data-theme="dark"] .entry-hero,
[data-theme="dark"] .hero-section-overlay,
[data-theme="dark"] .page-header {
    background-color: #1E1E1E !important;
}

/* 夜间模式卡片、section标题、所有块背景 */
[data-theme="dark"] .road-profile-card,
[data-theme="dark"] .road-featured-card,
[data-theme="dark"] .road-grid-card,
[data-theme="dark"] .road-cat-item,
[data-theme="dark"] .road-panel-card,
[data-theme="dark"] .road-tags-cloud a {
    background-color: var(--bg-card) !important;
}

/* 夜间模式文字颜色 */
[data-theme="dark"] .road-grid-title,
[data-theme="dark"] .road-grid-meta,
[data-theme="dark"] .road-grid-excerpt,
[data-theme="dark"] .road-grid-foot,
[data-theme="dark"] .road-cat-name,
[data-theme="dark"] .road-cat-count {
    color: var(--text) !important;
}
[data-theme="dark"] .road-section-title {
    color: var(--text-muted) !important;
}

[data-theme="dark"] {
    --bg: #1E1E1E;
    --bg-card: #2A2A2A;
    --bg-soft: #333333;
    --text: #E0DDD8;
    --text-muted: #96928C;
    --text-light: #6E6A66;
    --accent: #D4887A;
    --accent-soft: rgba(212,136,122,0.12);
    --border: #3A3A3A;
    --shadow: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.3);
}
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.06);
    --font-serif: 'Georgia','Noto Serif SC',serif;
    --font-sans: -apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
    --max-width: 800px;
    --entry-width: 100%;
}

/* ========== Base ========== */
body {
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: var(--font-sans);
    line-height: 1.8;
    font-size: 16px;
}
::selection { background: var(--accent-soft); color: var(--text); }
a { color: var(--accent); text-decoration: none; transition: all .2s; }
a:hover { color: var(--text); }

/* ========== Content above particles ========== */
.site, #wrapper, .content-wrap, #primary, .site-header, .site-footer {
    position: relative;
    z-index: 1;
}

/* ========== Reset Kadence Overrides ========== */
.entry-hero-container-inner { background: transparent !important; }
.hero-section-overlay { background: transparent !important; }
.hero-container .hero-inner-wrap { padding: 0 !important; }
.has-sidebar .content-container { gap: 2rem; }
.content-container { max-width: 1200px; padding: 0 1rem; }
.entry-content.single-content { max-width: 100% !important; width: 100% !important; }

/* ========== Front Page - Full Width ========== */
.road-front-page .content-container { max-width: 100% !important; padding: 0 !important; }
.road-front-page #primary { max-width: 100% !important; padding: 0 !important; }
.road-front-page .site-main { padding: 0 !important; }
.road-front-page .entry-content-wrap { padding: 0 !important; max-width: 100% !important; }
.road-front-page .entry-content { max-width: 100% !important; width: 100% !important; padding: 0 !important; }

/* ========== Header ========== */
.site-header,
.site-header-wrap {
    background: rgba(250,250,248,0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border) !important;
}
.header-container { padding: 0 1.5rem !important; }
.site-title { font-family: var(--font-serif) !important; font-weight: 700 !important; font-size: 1.4rem !important; letter-spacing: -0.3px; }
.site-title a { color: var(--text) !important; }
.main-navigation .menu-item>a {
    font-weight: 500 !important;
    font-size: .85rem !important;
    color: var(--text-muted) !important;
}
.main-navigation .menu-item>a:hover { color: var(--text) !important; }

/* ========== Single Post ========== */
.single .entry-header {
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem 1.5rem;
}
.single .entry-header .entry-title {
    font-size: 2rem !important;
    line-height: 1.35;
    color: var(--text) !important;
}
.single .entry-header .entry-meta { justify-content: center; gap: .8rem; }
.single-content {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text) !important;
    max-width: var(--max-width) !important;
    margin: 0 auto !important;
}
.single-content p { margin-bottom: 1.6rem; }
.single-content h2 { font-family: var(--font-sans); font-weight: 700; font-size: 1.4rem; margin: 2.2rem 0 1rem; }
.single-content h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.15rem; margin: 1.8rem 0 .8rem; }
.single-content blockquote,
.wp-block-quote {
    background: var(--bg-soft);
    border-left: 3px solid var(--accent);
    padding: 1.2rem 1.5rem;
    margin: 1.8rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-muted);
}

/* ========== Footer ========== */
.site-footer { background: var(--bg-card) !important; border-top: 1px solid var(--border) !important; }
.site-footer .site-info { font-family: var(--font-serif); font-style: italic; color: var(--text-light); font-size: .85rem; }

/* ========== NOW Bar ========== */
.road-bar-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-bar-inner {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .6rem 1.2rem;
    font-size: .82rem; color: var(--text-muted); box-shadow: var(--shadow);
}
.road-bar-label { font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }

/* ========== Featured ========== */
.road-featured-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-featured-card {
    position: relative; border-radius: var(--radius); overflow: hidden;
    min-height: 360px; display: flex; align-items: flex-end;
    background: var(--bg-card); border: 1px solid var(--border);
}
.road-featured-bg { position: absolute; inset: 0; background: linear-gradient(135deg,var(--bg-soft),var(--bg)); }
.road-featured-overlay { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.5) 0%,transparent 60%); }
.road-featured-inner { position: relative; z-index: 2; padding: 2rem; color: #fff; width: 100%; }
.road-featured-cats { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .5rem; }
.road-featured-cats a { color: var(--accent) !important; }
.road-featured-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.6rem; line-height: 1.3; margin: 0 0 .5rem; }
.road-featured-title a { color: #fff !important; }
.road-featured-meta { font-size: .78rem; opacity: .7; }

/* ========== Section Title ========== */
.road-section-title {
    font-size: .85rem; font-weight: 700;
    letter-spacing: 1px; color: var(--text-muted);
    margin: 2rem 0 1rem;
}

/* ========== Hero ========== */
.road-hero-wrap { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1rem 0; text-align: center; }
.road-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; display: block; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.road-hero-name { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 0.3rem 0; }
.road-hero-bio { font-size: 0.9rem; color: var(--text-muted); margin: 0.2rem 0 0.8rem; }
.road-hero-stats { display: flex; justify-content: center; gap: 1.5rem; margin: 1rem 0 0; }
.road-hero-stat { text-align: center; }
.road-hero-stat-num { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--text); }
.road-hero-stat-label { font-size: 0.72rem; color: var(--text-light); }
.road-hero-quote { font-family: var(--font-serif); font-style: italic; color: var(--text-muted); font-size: 0.85rem; margin-top: 1.2rem; opacity: 0.7; }

/* ========== Post Grid ========== */
.road-grid-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 640px) { .road-grid { grid-template-columns: repeat(2, 1fr); } }
.road-grid-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: all 0.3s ease; text-decoration: none;
    display: flex; flex-direction: column;
}
.road-grid-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.road-grid-img { width: 100%; height: 180px; object-fit: cover; display: block; background: var(--bg-soft); }
.road-grid-body { padding: 1rem 1rem 0.8rem; flex: 1; }
.road-grid-meta { font-size: 0.72rem; color: var(--text-light); margin-bottom: 0.3rem; }
.road-grid-meta a { color: var(--accent); }
.road-grid-title { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.4; margin: 0 0 0.3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.road-grid-card:hover .road-grid-title { color: var(--accent); }
.road-grid-excerpt { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.road-grid-foot { padding: 0.5rem 1rem 0.8rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; font-size: 0.72rem; color: var(--text-light); }

/* ========== Stats Panel ========== */
.road-panel-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.road-panel-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.8rem;
    text-align: center; transition: all 0.2s;
}
.road-panel-card:hover { border-color: var(--accent); }
.road-panel-num { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--text); }
.road-panel-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ========== Tags Cloud ========== */
.road-tags-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-tags-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.road-tags-cloud a {
    display: inline-block; padding: 0.25rem 0.8rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; font-size: 0.78rem; color: var(--text-muted);
    transition: all 0.2s; text-decoration: none;
}
.road-tags-cloud a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ========== Categories Grid ========== */
.road-cats-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.road-cat-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1rem; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: all 0.2s; text-decoration: none;
}
.road-cat-item:hover { border-color: var(--accent); }
.road-cat-icon { font-size: 1.1rem; }
.road-cat-name { font-size: 0.82rem; color: var(--text); flex: 1; }
.road-cat-count { font-size: 0.7rem; color: var(--text-light); background: var(--bg-soft); padding: 0.1rem 0.4rem; border-radius: 10px; }

/* ========== Recent Posts ========== */
.road-recent-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-recent-list { display: flex; flex-direction: column; gap: 0.5rem; }
.road-post-row {
    display: flex; align-items: center; gap: 0.8rem;
    padding: 0.6rem 1rem; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: all 0.2s; text-decoration: none;
}
.road-post-row:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.road-post-date { font-size: 0.75rem; color: var(--text-light); white-space: nowrap; min-width: 50px; }
.road-post-title { font-family: var(--font-serif); font-size: 0.88rem; color: var(--text); flex: 1; }
.road-post-row:hover .road-post-title { color: var(--accent); }
.road-post-cat { font-size: 0.7rem; color: var(--text-light); }

/* ========== Links ========== */
.road-links-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.road-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
.road-link-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 0.8rem; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); transition: all 0.2s;
    text-decoration: none; color: var(--text);
}
.road-link-item:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.road-link-avatar { width: 40px; height: 40px; border-radius: 50%; margin-bottom: 0.4rem; }
.road-link-name { font-size: 0.78rem; font-weight: 600; }

/* ========== Share ========== */
.road-share-section { max-width: var(--max-width); margin: 2rem auto; text-align: center; padding: 0 1rem; }
.road-share-label { font-size: 0.75rem; color: var(--text-light); letter-spacing: 1px; margin-bottom: 1rem; }
.road-share-links { display: flex; gap: 0.6rem; justify-content: center; }
.road-share-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 0.85rem;
}
.road-share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ========== Progress Bar & Scroll ========== */
#road-progress-bar { position: fixed; top: 0; left: 0; width: 0; height: 3px; background: var(--accent); z-index: 100000; transition: width .1s; }
#road-scroll-top { position: fixed; bottom: 30px; right: 30px; z-index: 99999; width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: #fff; border: none; cursor: pointer; opacity: 0; transform: translateY(20px); transition: .3s; box-shadow: 0 4px 12px rgba(0,0,0,.15); font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
#road-scroll-top.visible { opacity: 1; transform: translateY(0); }
#road-scroll-top:hover { background: var(--accent); }

/* ========== Scroll Animation ========== */
.road-reveal { opacity: 0; transform: translateY(20px); transition: all .5s ease; }
.road-reveal.road-revealed { opacity: 1; transform: translateY(0); }

/* ========== Typing Effect ========== */
.road-typing {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1rem 0;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-muted);
    min-height: 2.5rem;
}
.road-type-cursor {
    animation: blink 0.8s step-end infinite;
    color: var(--accent);
    font-weight: 100;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* ========== Road Layout (Left + Right) ========== */
.road-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}
.road-main { min-width: 0; }
.road-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Profile Card */
.road-profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem 1.2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.road-profile-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 0.8rem; display: block;
    border: 2px solid var(--border);
}
.road-profile-name {
    font-family: var(--font-serif);
    font-size: 1.1rem; font-weight: 700; color: var(--text);
}
.road-profile-bio {
    font-size: 0.8rem; color: var(--text-muted);
    margin: 0.2rem 0 0.5rem;
}
.road-profile-quote {
    font-family: var(--font-serif);
    font-style: italic; font-size: 0.78rem;
    color: var(--text-light); padding: 0.5rem 0;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}
.road-profile-stats {
    display: flex; justify-content: center; gap: 1rem;
    font-size: 0.72rem; color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.8rem; margin-top: 0.5rem;
}
.road-profile-stats span {
    font-family: var(--font-serif);
    font-weight: 700; color: var(--text);
    font-size: 1rem;
}

/* Sidebar sections narrower */
.road-sidebar .road-cats-wrap,
.road-sidebar .road-panel-wrap,
.road-sidebar .road-tags-wrap {
    max-width: 100% !important;
    margin: 0;
    padding: 0;
}
.road-sidebar .road-section-title {
    font-size: 0.78rem;
    margin: 0 0 0.6rem;
}
.road-sidebar .road-cats-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
}
.road-sidebar .road-cat-item {
    padding: 0.4rem 0.8rem;
}
.road-sidebar .road-cat-icon { font-size: 0.9rem; }
.road-sidebar .road-cat-name { font-size: 0.78rem; }
.road-sidebar .road-cat-count { font-size: 0.65rem; }
.road-sidebar .road-panel-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}
.road-sidebar .road-panel-card {
    padding: 0.5rem 0.3rem;
}
.road-sidebar .road-panel-num { font-size: 1rem; }
.road-sidebar .road-panel-label { font-size: 0.65rem; }
.road-sidebar .road-tags-cloud {
    justify-content: flex-start;
}
.road-sidebar .road-tags-cloud a {
    padding: 0.15rem 0.6rem;
    font-size: 0.72rem;
}

/* Remove max-width from main sections */
.road-main .road-featured-wrap,
.road-main .road-grid-wrap {
    max-width: 100% !important;
    margin: 0 0 2rem;
    padding: 0;
}

/* ========== Carousel ========== */
.road-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    aspect-ratio: 2 / 1;
    background: var(--bg-soft);
}
.road-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}
.road-carousel-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}
.road-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.road-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.road-carousel-btn:hover { background: #fff; color: var(--accent); }
.road-carousel-prev { left: 12px; }
.road-carousel-next { right: 12px; }
.road-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.road-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}
.road-dot.active { background: #fff; width: 20px; border-radius: 4px; }

/* ========== Theme Switch Button ========== */
#road-theme-switch {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99999;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s;
    --active: 0;
}
#road-theme-switch:hover {
    border-color: var(--accent);
}
.road-theme-icon {
    position: absolute;
    font-size: 1.15rem;
    transition: all 0.3s;
    pointer-events: none;
}
.road-theme-icon:first-child {
    opacity: calc(1 - var(--active));
    transform: translateY(calc(var(--active) * -40px));
}
.road-theme-icon:last-child {
    opacity: var(--active);
    transform: translateY(calc((1 - var(--active)) * 40px));
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .road-layout {
        grid-template-columns: 1fr;
    }
    .road-sidebar {
        position: static;
    }
}
@media (max-width: 768px) {
    body { font-size: 15px; }
    .single .entry-header .entry-title { font-size: 1.5rem !important; }
    .road-featured-card { min-height: 250px; }
    .road-featured-title { font-size: 1.2rem; }
    .road-cats-grid { grid-template-columns: repeat(2,1fr); }
    .site-title { font-size: 1.2rem !important; }
    #road-scroll-top { bottom: 20px; right: 20px; width: 36px; height: 36px; font-size: 1rem; }
}
