
/* ===============================================
   iGarden 站点主题能力
   ═══════════════════════════════════════════════
   配置项（在 hugo.yaml 的 params 中设置）：
     watermark_text: "李玮"      ← 水印文字（空=不显示）
     initials_logo_style: "seal"  ← 品牌标识样式
   =============================================== */

.banner-hero {
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* 名片名字 */
.card-name {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    color: #1a1a1a;
    line-height: 1.3;
    font-family: 'LXGW WenKai', 'LXGWWenKai', 'Noto Serif SC', 'KaiTi', 'STKaiti', '楷体', serif;
}
.card-name .name-sep {
    letter-spacing: 0.35em;
}

/* ─── 品牌印章（左上角导航栏，中山王篆「李」朱文印） ─── */
.brand-seal {
    display: inline-block;
    width: 44px;
    height: 44px;
    background: transparent;
    background-image: url("/images/logo-seal.png");
    background-image: url("/images/logo-seal.svg");
    background-image: image-set(url("/images/logo-seal.svg") 1x, url("/images/logo-seal.svg") 2x);
    background-image: url("/images/logo-seal.svg"), url("/images/logo-seal@2x.png"), url("/images/logo-seal.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    user-select: none;
    transition: opacity 0.2s, box-shadow 0.2s;
    border-radius: 3px;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.13);
}
.brand-seal:hover {
    opacity: 0.88;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.18);
}

/* 默认用 PNG 保证跨浏览器一致性 */
@media (prefers-reduced-motion: no-preference) {
    .brand-seal {
        transition: opacity 0.3s, box-shadow 0.3s;
    }
}

/* HiDPI: 高清屏用 @2x PNG，避免模糊 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .brand-seal {
        background-image: url("/images/logo-seal.png");
    background-image: url("/images/logo-seal.svg");
    background-image: image-set(url("/images/logo-seal.svg") 1x, url("/images/logo-seal.svg") 2x);
    background-image: url("/images/logo-seal.svg"), url("/images/logo-seal@2x.png"), url("/images/logo-seal.png");
    }
}

/* ─── 页面背景水印 ─── */
/* 使用 PNG 平铺（篆书「李玮」用 Pillow 预渲染，无字体加载问题） */


/* 内容层置于水印之上 */
.page-wrapper {
    position: relative;
    z-index: 1;
    background: #fff;
    background-image: url("/images/watermark.png");
    background-repeat: repeat;
    background-size: 240px 200px;
    min-height: 100vh;
}
/* 内容区域白色背景覆盖水印 */
.page-wrapper > *:not(.watermark-layer) {
    position: relative;
}


/* ═══════════════════════════════════════════════
   iGarden 自定义样式 — 文章阅读体验优化
   ═══════════════════════════════════════════════ */

.main-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #333;
}

/* 大标题（页面标题，非正文h1） */
.page-title {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
    color: #111;
}

/* 副标题 */
.page-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #777;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    font-style: italic;
    letter-spacing: 0.02em;
    text-align: right;
    position: relative;
}

/* 正文h2 — 章节标题 */
.main-content h2 {
    font-size: 1.6rem;
    font-weight: 650;
    margin-top: 2.4rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e0e0e0;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

/* 正文h3 — 子章节标题 */
.main-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.6rem;
    margin-bottom: 0.4rem;
    color: #444;
    text-transform: none;
}

/* 正文段落 */
.main-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* 引用块 — 金句/核心观点 */
.main-content blockquote,
.flow-quote {
    border-left: 3px solid #ccc;
    padding: 0.3rem 0 0.3rem 1.2rem;
    margin: 1.2rem 0;
    color: #555;
    font-style: italic;
    background: #fafafa;
    border-radius: 0 4px 4px 0;
    white-space: pre-wrap;
}

/* 加粗强调 */
.main-content strong {
    font-weight: 600;
    color: #111;
    font-size: 1.1em;
}

/* 行内代码 */
.main-content code {
    background: #f4f4f4;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #c7254e;
}

/* 表格 */
.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
}
.main-content th, .main-content td {
    border: 1px solid #ddd;
    padding: 0.45rem 0.7rem;
    text-align: left;
    vertical-align: top;
}
.main-content th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}
.main-content tr:nth-child(even) {
    background: #fafafa;
}

/* 列表 */
.main-content ul, .main-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.main-content li {
    margin-bottom: 0.3rem;
    line-height: 1.7;
}

/* 水平分割线 */
.main-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #e8e8e8;
}

/* 面包屑导航 */
.breadcrumb {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1rem;
}
.breadcrumb a {
    text-decoration: none;
    color: #888;
}
.breadcrumb a:hover {
    color: #555;
}

/* 文章元信息（字数） */
.article-meta {
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
    margin-bottom: 0;
}

/* 文章摘要 */
.article-summary {
    font-size: 1.05rem;
    color: #666;
    font-style: italic;
    border-left: 3px solid #ddd;
    padding: 0.5rem 1rem;
    margin: 0;
    line-height: 1.6;
}

/* 主题图标 */
.topic-icon {
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s;
    border-radius: 50%;
}
.topic-icon:hover {
    opacity: 1;
}

/* 卡片底部元信息（字数 · 日期 · 状态） */
.card-meta {
    font-size: 0.8rem;
    color: #aaa;
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.5rem;
}
.card-meta-sep {
    color: #ddd;
}

/* 底部导航 */
.bottom-nav {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
.bottom-nav a {
    text-decoration: none;
    color: #888;
}
.bottom-nav a:hover {
    color: #555;
}

/* 代码块 */
.main-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid #e8e8e8;
    margin: 1rem 0;
}

/* 玮陀朗读高亮（v2.2.0）：段落级金色左框锚点 + 句子级 <mark> 荧光笔 */
.weituo-hl {
    border-left: 4px solid #e9a23b !important;
    background: rgba(233, 162, 59, 0.08) !important;
    border-radius: 0 4px 4px 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}
[data-theme="dark"] .weituo-hl,
.dark-mode .weituo-hl {
    border-left-color: #f0b85a !important;
    background: rgba(240, 184, 90, 0.10) !important;
}
/* 句子级荧光笔：当前朗读句（高对比荧光黄，逐字标记） */
mark.weituo-mark {
    background: linear-gradient(transparent 40%, rgba(255, 213, 79, 0.65) 40%) !important;
    color: inherit !important;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
    transition: background 0.25s ease;
}
[data-theme="dark"] mark.weituo-mark,
.dark-mode mark.weituo-mark {
    background: linear-gradient(transparent 40%, rgba(255, 179, 71, 0.60) 40%) !important;
}
