:root {
    /* --- THEME VARIABLES --- */
    
    /* Default (Light/Sun) */
    --bg-body: #e0e0e0;
    
    /* Toggle Specifics (Light) */
    --toggle-bg: #e0e0e0;
    --toggle-shadow: inset 5px 5px 10px #bebebe, inset -5px -5px 10px #ffffff;
    --toggle-radius: 24px;
    --indicator-bg: #ffffff;
    --indicator-shadow: 0 4px 10px rgba(0,0,0,0.1);
    --indicator-x: 100%;
    --icon-color: #555555;
    --icon-active: #111827;
    
    /* CARD STYLE 1: Light (Hero, About, Status) */
    --c1-bg: #ffffff;
    --c1-text: #111827;
    --c1-sub: #555555;
    --c1-dot: #cbd5e1;
    
    /* CARD STYLE 2: Blue (Contact) */
    --c2-bg: #0055FF;
    --c2-text: #ffffff;
    --c2-dot: rgba(0,0,0,0.2);
    --c2-tag-shadow: 0 4px 10px rgba(0,0,0,0.1);
    
    /* CARD STYLE 3: Dark (Timezone, Blog) */
    --c3-bg: #ffffff;
    --c3-text: #111827;
    --c3-border: rgba(0,0,0,0.08);
    --c3-texture: rgba(0,0,0,0.03);
    --c3-sub: rgba(0,0,0,0.6);
    --c3-icon: rgba(0,0,0,0.05);

    /* Social Buttons - Light */
    --social-btn-bg: rgba(0,0,0,0.06);
    --social-btn-hover: rgba(0,0,0,0.12);

    /* Shadows */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px -5px rgba(0,0,0,0.15);
    
    /* Constants */
    --radius: 24px;
    --gap: 16px;
    --transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Post View Variables - Light Theme */
    --pv-bg: #f8f8f8;
    --pv-text: #111827;
    --pv-text-secondary: #555555;
    --pv-text-muted: #888888;
    --pv-title: #111827;
    --pv-heading: #f59e0b;
    --pv-border: rgba(0, 0, 0, 0.1);
    --pv-code-bg: #f1f5f9;
    --pv-code-text: #0369a1;
    --pv-blockquote-bg: rgba(0, 0, 0, 0.03);
    --pv-btn-border: rgba(0, 0, 0, 0.2);
    --pv-btn-text: #111827;
    --pv-btn-hover-bg: rgba(0, 0, 0, 0.05);
}

/* --- ORANGE THEME --- */
[data-theme="orange"] {
    --bg-body: #FFB347;
    
    /* Toggle Specifics (Orange) */
    --toggle-bg: #FFA726;
    --toggle-shadow: inset 0 2px 8px rgba(0,0,0,0.15);
    --indicator-bg: #ffffff;
    --indicator-shadow: 0 4px 12px rgba(0,0,0,0.2);
    --indicator-x: 0%;
    --icon-color: rgba(255,255,255,0.5);
    --icon-active: #FF6B00;

    /* Orange Mode Card Overrides - 温暖的奶油色系 */
    --c1-bg: #FFF8F0;
    --c1-text: #4A2C00;
    --c1-sub: #8B5A2B;
    --c1-dot: rgba(255, 107, 0, 0.15);
    
    --c2-bg: #FF8C42;
    --c2-text: #ffffff;
    --c2-dot: rgba(0,0,0,0.1);
    
    --c3-bg: #4A2C00;
    --c3-text: #FFF8F0;
    --c3-border: rgba(255,255,255,0.15);
    --c3-texture: rgba(255,255,255,0.05);
    --c3-sub: rgba(255,248,240,0.7);
    --c3-icon: rgba(255,255,255,0.1);

    /* Social Buttons - Orange */
    --social-btn-bg: rgba(74,44,0,0.15);
    --social-btn-hover: rgba(74,44,0,0.25);
    
    --shadow-card: 0 4px 12px rgba(74, 44, 0, 0.15);
    --shadow-hover: 0 20px 40px -5px rgba(74, 44, 0, 0.25);

    /* Post View Variables - Orange Theme */
    --pv-bg: #FFB347;
    --pv-text: #FFF8F0;
    --pv-text-secondary: rgba(255, 248, 240, 0.7);
    --pv-text-muted: rgba(255, 248, 240, 0.5);
    --pv-title: #FFF8F0;
    --pv-heading: #FF6B00;
    --pv-border: rgba(255, 255, 255, 0.15);
    --pv-code-bg: rgba(255, 255, 255, 0.1);
    --pv-code-text: #FFD89B;
    --pv-blockquote-bg: rgba(255, 255, 255, 0.05);
    --pv-btn-border: rgba(255, 248, 240, 0.3);
    --pv-btn-text: #FFF8F0;
    --pv-btn-hover-bg: rgba(255, 255, 255, 0.1);
}

/* Logo color for orange theme */
[data-theme="orange"] .logo { color: #FFF8F0; }

/* --- DARK THEME --- */
[data-theme="dark"] {
    --bg-body: #121212;
    
    /* Toggle Specifics (Dark) */
    --toggle-bg: #2d2d44;
    --toggle-shadow: none;
    --indicator-bg: #4a4a6a;
    --indicator-shadow: 0 4px 10px rgba(0,0,0,0.3);
    --indicator-x: 200%;
    --icon-color: rgba(255,255,255,0.2);
    --icon-active: #ffffff;

    /* Dark Mode Card Overrides */
    --c1-bg: #0d0d0d;
    --c1-text: #ffffff;
    --c1-sub: #a3a3a3;
    --c1-dot: rgba(255,255,255,0.1);
    
    --c2-bg: #0044cc;
    --c2-text: #ffffff;
    --c2-dot: rgba(0,0,0,0.3);
    
    --c3-bg: #1a1a1a;
    --c3-text: #ffffff;
    --c3-border: rgba(255,255,255,0.1);
    --c3-texture: rgba(255,255,255,0.04);
    --c3-sub: rgba(255,255,255,0.6);
    --c3-icon: rgba(255,255,255,0.1);

    /* Social Buttons - Dark */
    --social-btn-bg: rgba(255,255,255,0.1);
    --social-btn-hover: rgba(255,255,255,0.2);

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 40px -5px rgba(0,0,0,0.5);

    /* Post View Variables - Dark Theme */
    --pv-bg: #0f0f0f;
    --pv-text: #d4d4d4;
    --pv-text-secondary: #888888;
    --pv-text-muted: #666666;
    --pv-title: #ffffff;
    --pv-heading: #f59e0b;
    --pv-border: rgba(255, 255, 255, 0.1);
    --pv-code-bg: #1a1a2e;
    --pv-code-text: #60a5fa;
    --pv-blockquote-bg: rgba(255, 255, 255, 0.04);
    --pv-btn-border: rgba(255, 255, 255, 0.25);
    --pv-btn-text: #ffffff;
    --pv-btn-hover-bg: rgba(255, 255, 255, 0.08);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background-color 0.4s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

* {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

*:focus {
    outline: none;
}

/* Utilities */
.container { 
    max-width: 960px;
    margin: 0 auto; 
    padding: 0 24px; 
}
a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }
ul { list-style: none; padding: 0; margin: 0; }
* { box-sizing: border-box; }

/* Typography */
.serif-italic { font-family: var(--font-serif); font-style: italic; }
.font-bold { font-weight: 700; }
.text-uppercase { text-transform: uppercase; letter-spacing: 1px; }

/* Header */
header#main-header { 
    padding: 24px 0;
    position: fixed;
    width: 100%; 
    top: 0; 
    z-index: 100;
    background: transparent;
    transition: transform 0.3s ease;
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--c1-text); transition: color 0.4s; }
[data-theme="dark"] .logo { color: #fff; }

/* --- NEW HEADER LAYOUT --- */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- NEW THEME TOGGLE STYLE --- */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    width: 140px;
    height: 44px;
    background: var(--toggle-bg);
    border-radius: 22px;
    padding: 4px;
    box-shadow: var(--toggle-shadow);
}

.theme-toggle .switch-indicator {
    position: absolute;
    top: 50%;
    left: 4px;
    width: calc((100% - 8px) / 3);
    height: 36px;
    background: var(--indicator-bg);
    border-radius: 18px;
    box-shadow: var(--indicator-shadow);
    transform: translateX(var(--indicator-x)) translateY(-50%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s ease;
    z-index: 1;
}

.theme-toggle .switch-icons {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

.theme-toggle .icon-btn {
    flex: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    font-size: 16px;
    transition: color 0.3s ease;
    outline: none;
}

/* Active State Colors */
[data-theme="light"] .icon-btn[data-mode="light"] { color: var(--icon-active); }
[data-theme="orange"] .icon-btn[data-mode="orange"] { color: var(--icon-active); }
[data-theme="dark"] .icon-btn[data-mode="dark"] { color: var(--icon-active); }

/* Grid System */
#main-content { 
    padding-top: 100px;
    padding-bottom: 60px;
    flex: none;
}
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
}

@media (min-width: 768px) { 
    .bento-grid { 
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(140px, auto);
    }
    
    /* 在768px-1024px之间，grid-stacked需要特殊处理 */
    .grid-stacked {
        grid-column: span 1;
        grid-row: span 2;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .grid-stacked > .bento-card,
    .grid-stacked > a.bento-card {
        flex: 1;
        min-height: 0;
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, minmax(160px, auto));
        gap: var(--gap);
    }
    
    /* HERO: 左侧大卡，占2列2行 */
    .grid-hero { 
        grid-column: span 2; 
        grid-row: span 2;
    }
    
    /* ABOUT: 中间，占1列2行（高卡片） */
    .grid-about { 
        grid-column: span 1; 
        grid-row: span 2;
    }
    
    /* 右侧堆叠区：占1列2行，内部上下堆叠 */
    .grid-stacked { 
        grid-column: span 1; 
        grid-row: span 2;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .grid-stacked > .bento-card,
    .grid-stacked > a.bento-card {
        flex: 1;
        min-height: 0;
    }
    
    /* 第二行的卡片放到第三行（因为前两行被大卡占满） */
    .grid-contact { 
        grid-column: span 1;
    }
    .grid-timezone { 
        grid-column: span 2;
    }
    .grid-blog { 
        grid-column: span 1;
    }
}

/* Base Card Styling */
.bento-card {
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: default;
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); z-index: 10; }

.card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* STYLE 1: Light */
.style-light {
    background-color: var(--c1-bg);
    color: var(--c1-text);
    box-shadow: var(--shadow-card);
}
.halftone-bottom {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 50%;
    background-image: radial-gradient(var(--c1-dot) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 0;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--c1-text);
}
.hero-sub {
    font-size: 0.95rem;
    color: var(--c1-sub);
    max-width: 90%;
}

/* --- Social Buttons Styles --- */
.social-buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
    position: relative;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--social-btn-bg, rgba(0,0,0,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c1-text);
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    transform: scale(1.1);
    background: var(--social-btn-hover, rgba(0,0,0,0.12));
    opacity: 1;
}

.social-btn svg {
    display: block;
}

/* 彩蛋按钮 */
.social-btn.easter-egg {
    border: none;
    cursor: pointer;
}

/* 笑脸按钮包装器 */
.easter-egg-wrapper {
    position: relative;
    display: inline-flex;
}

/* 彩蛋弹窗 - Modified */
.easter-egg-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.95);
    width: 260px;
    background: var(--c1-bg);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    text-align: center;
    pointer-events: none;
}

.easter-egg-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

/* 小三角箭头 - 居中指向笑脸按钮 */
.popup-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: var(--c1-bg);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.05);
}

/* 对话消息 - Modified */
.popup-msg {
    font-size: 14px;
    color: var(--c1-text);
    line-height: 1.5;
}

/* 深色主题适配 */
[data-theme="dark"] .easter-egg-popup {
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

/* STYLE 2: Blue */
.style-blue {
    background-color: var(--c2-bg);
    color: var(--c2-text);
    box-shadow: var(--shadow-card);
    border: none;
}
.halftone-full {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(var(--c2-dot) 2px, transparent 2px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}
/* Removed min-height from grid-contact as requested */
.style-blue.grid-contact { position: relative; }

.contact-text {
    position: absolute; 
    bottom: 20px; 
    left: 20px;
    width: auto;
    color: white; 
    font-family: 'Playfair Display', serif; 
    font-style: italic; 
    font-size: 1.1rem; 
    line-height: 1.4;
    pointer-events: none; 
    z-index: 20;
}

/* Physics Container & Tags */
.physics-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
}

.physics-tag {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    cursor: grab;
    transition: background 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.physics-tag i {
    font-size: 1.2rem;
    line-height: 1;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.physics-tag:hover {
    background: rgba(255, 255, 255, 0.3);
}

.physics-tag:active {
    cursor: grabbing;
    outline: none;
}

/* STYLE 3: Dark */
.style-dark {
    background-color: var(--c3-bg);
    color: var(--c3-text);
    border: 1px solid var(--c3-border);
    box-shadow: var(--shadow-card);
}
.texture-diagonal {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, var(--c3-texture) 0, var(--c3-texture) 1px, transparent 1px, transparent 8px),
        repeating-linear-gradient(-45deg, var(--c3-texture) 0, var(--c3-texture) 1px, transparent 1px, transparent 8px);
    z-index: 0; pointer-events: none;
}

.stacked-text { font-size: 1.5rem; font-weight: 700; line-height: 1.2; display: flex; flex-direction: column; }
.stacked-text span { display: block; }
.clock-display { 
    font-size: 2rem;
    font-weight: 700; 
    font-variant-numeric: tabular-nums; 
    letter-spacing: -1px;
}
.blog-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--c3-sub); }
.arrow-icon { background: var(--c3-icon); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Status Dot */
.status-dot {
    width: 10px; height: 10px; background-color: #22c55e;
    border-radius: 50%; display: inline-block; margin-right: 6px;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

/* Resume Card */
.resume-card {
    cursor: pointer;
}

.resume-card .card-content {
    padding: 20px;
    justify-content: space-between;
}

.resume-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.resume-icon {
    font-size: 1.5rem;
    color: var(--c3-text);
}

.resume-arrow {
    font-size: 1rem;
    color: var(--c3-sub);
}

.resume-text {
    display: flex;
    flex-direction: column;
}

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #FF6B00);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Blog List View */
#blog-list-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--pv-bg);
    z-index: 200;
    overflow-y: auto;
    padding: 40px 24px;
}

.blog-list-container {
    max-width: 800px;
    margin: 0 auto;
}

.posts-page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--pv-title);
    font-family: var(--font-serif);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-list-card {
    cursor: pointer;
    min-height: 80px;
    padding: 24px 32px;
}

.post-list-card .card-content {
    padding: 0;
}

/* Post View */
#post-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--pv-bg);
    z-index: 300;
    overflow-y: auto;
    padding: 40px 0;
}

.post-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--pv-btn-border);
    color: var(--pv-btn-text);
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--pv-btn-hover-bg);
}

.btn-back-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--pv-btn-border);
    color: var(--pv-btn-text);
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-back-pill:hover {
    background: var(--pv-btn-hover-bg);
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--pv-border);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.post-title {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--pv-title);
    font-family: var(--font-serif);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--pv-text-secondary);
    font-size: 0.875rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.post-body {
    color: var(--pv-text);
    line-height: 1.8;
    font-size: 1.1rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    color: var(--pv-heading);
    margin-top: 2em;
    margin-bottom: 1em;
    font-family: var(--font-serif);
}

.post-body h1 { font-size: 2rem; }
.post-body h2 { font-size: 1.75rem; }
.post-body h3 { font-size: 1.5rem; }

.post-body p {
    margin-bottom: 1.5em;
}

.post-body a {
    color: var(--pv-heading);
    text-decoration: underline;
}

.post-body code {
    background: var(--pv-code-bg);
    color: var(--pv-code-text);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.post-body pre {
    background: var(--pv-code-bg);
    padding: 1.5em;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

.post-body pre code {
    background: transparent;
    padding: 0;
}

.post-body blockquote {
    background: var(--pv-blockquote-bg);
    border-left: 4px solid var(--pv-heading);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--pv-text-secondary);
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.post-body li {
    margin-bottom: 0.5em;
}

.post-body ul {
    list-style: disc;
}

.post-body ol {
    list-style: decimal;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
}

.post-body hr {
    border: none;
    border-top: 1px solid var(--pv-border);
    margin: 2em 0;
}

.post-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--pv-border);
}

.thanks {
    text-align: center;
    color: var(--pv-text-muted);
    font-size: 1rem;
    font-style: italic;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .posts-page-title { font-size: 2.5rem; }
    .post-list-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; }
    
    /* 移动端grid-stacked样式 */
    .grid-stacked {
        grid-column: span 1;
        grid-row: span 1;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .grid-stacked > .bento-card,
    .grid-stacked > a.bento-card {
        flex: none;
        min-height: auto;
    }
    
    /* 移动端卡片内容padding调整 */
    .card-content {
        padding: 16px;
    }
}

/* Resume Page Styles */
#resume-view {
    display: block;
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: 100vh;
}

.resume-nav {
    margin-bottom: 40px;
}

/* Compact Resume Page Styles */
.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.resume-grid-card {
    background: var(--c1-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.resume-grid-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--c1-dot);
}

.card-header i {
    font-size: 1.3rem;
    color: #f59e0b;
    width: 28px;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: var(--c1-text);
}

.card-text {
    margin: 0;
    line-height: 1.6;
    color: var(--c1-sub);
    font-size: 0.9rem;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.profile-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--c1-text);
    font-family: var(--font-serif);
}

.profile-title {
    font-size: 1rem;
    color: #f59e0b;
    margin: 0 0 10px;
    font-weight: 500;
}

.profile-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-meta span {
    font-size: 0.85rem;
    color: var(--c1-sub);
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    color: var(--c1-text);
    font-size: 0.9rem;
}

.contact-item i {
    color: #f59e0b;
    width: 20px;
    text-align: center;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
}

.skill-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--c1-text);
}

.skill-desc {
    font-size: 0.85rem;
    color: var(--c1-sub);
    line-height: 1.5;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.exp-item {
    padding: 16px;
    background: rgba(245, 158, 11, 0.03);
    border-radius: 10px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 16px;
}

.exp-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--c1-text);
}

.exp-role {
    font-size: 0.9rem;
    color: #f59e0b;
    font-weight: 500;
}

.exp-date {
    font-size: 0.8rem;
    color: var(--c1-sub);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.exp-project {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.exp-project:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.exp-project h5 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: #f59e0b;
}

.exp-desc {
    margin: 0 0 14px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--c1-sub);
}

.exp-responsibilities {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.resp-item {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--c1-sub);
    padding-left: 10px;
}

.resp-item strong {
    color: var(--c1-text);
    font-weight: 600;
}

.exp-achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.achievement-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--c1-sub);
    padding: 7px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 14px;
}

.achievement-tag i {
    color: #f59e0b;
    font-size: 0.75rem;
}

.education-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.edu-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #f59e0b, #FF6B00);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edu-icon i {
    font-size: 1.4rem;
    color: white;
}

.edu-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--c1-text);
}

.edu-major {
    font-size: 0.95rem;
    color: #f59e0b;
    margin: 0 0 8px;
    font-weight: 500;
}

.edu-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.edu-skills span {
    font-size: 0.8rem;
    color: var(--c1-sub);
    padding: 5px 12px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 14px;
}

/* Resume Page Theme Adaptations */
[data-theme="orange"] .resume-grid-card,
[data-theme="orange"] .profile-name,
[data-theme="orange"] .card-header h3,
[data-theme="orange"] .skill-label,
[data-theme="orange"] .exp-header h4,
[data-theme="orange"] .project-info h4,
[data-theme="orange"] .edu-info h4 {
    color: var(--c1-text);
}

[data-theme="dark"] .resume-grid-card,
[data-theme="dark"] .profile-name,
[data-theme="dark"] .card-header h3,
[data-theme="dark"] .skill-label,
[data-theme="dark"] .exp-header h4,
[data-theme="dark"] .project-info h4,
[data-theme="dark"] .edu-info h4 {
    color: var(--c1-text);
}

/* Resume Page Mobile Adjustments */
@media (max-width: 768px) {
    .resume-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .resume-grid-card {
        padding: 20px;
    }
    
    .profile-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 1.8rem;
    }
    
    .profile-title {
        font-size: 1.1rem;
    }
    
    .profile-meta {
        justify-content: center;
    }
    
    .card-header {
        gap: 10px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .card-header h3 {
        font-size: 1.1rem;
    }
    
    .exp-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .exp-header h4 {
        font-size: 1rem;
    }
    
    .exp-project h5 {
        font-size: 1rem;
    }
    
    .exp-desc {
        font-size: 0.85rem;
    }
    
    .resp-item {
        font-size: 0.8rem;
    }
    
    .achievement-tag {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .education-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .edu-icon {
        width: 56px;
        height: 56px;
    }
    
    .edu-info h4 {
        font-size: 1rem;
    }
    
    .edu-skills {
        justify-content: center;
    }
}

/* Resume Footer */
.resume-footer {
    text-align: center;
    padding: 40px 0;
    color: var(--c1-sub);
    font-size: 0.9rem;
    border-top: 1px solid var(--c1-dot);
    margin-top: 60px;
}

/* ========================================
   卡片入场动画
   ======================================== */

.bento-card {
    opacity: 0;
    transform: translateY(40px);
    animation: cardFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为不同卡片设置不同的延迟时间，形成阶梯效果 */
.grid-hero { animation-delay: 0.1s; }
.grid-about { animation-delay: 0.2s; }
.grid-stacked .bento-card:nth-child(1) { animation-delay: 0.3s; }
.grid-stacked .bento-card:nth-child(2) { animation-delay: 0.4s; }
.grid-contact { animation-delay: 0.5s; }
.grid-timezone { animation-delay: 0.6s; }
.grid-blog { animation-delay: 0.7s; }

/* 博客列表页面的卡片入场动画 */
.post-list-card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 为博客列表卡片设置阶梯延迟 */
.post-list-card:nth-child(1) { animation-delay: 0.1s; }
.post-list-card:nth-child(2) { animation-delay: 0.2s; }
.post-list-card:nth-child(3) { animation-delay: 0.3s; }
.post-list-card:nth-child(4) { animation-delay: 0.4s; }
.post-list-card:nth-child(5) { animation-delay: 0.5s; }

/* =========================================
   RESUME STYLE: HALFTONE & SWISS (Fixed Theme Support)
   替换 styles.css 末尾的旧代码
   ========================================= */

/* 1. 页面容器：使用变量背景色 */
#resume-view.halftone-mode {
    background-color: var(--bg-body); /* 修复：跟随主题变色 */
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 100px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.4s ease;
}

/* 核心网格布局 */
.ht-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 卡片基础风格 --- */
.ht-card {
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

.ht-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    z-index: 2;
}

/* 深色模式边框修复 */
[data-theme="dark"] .ht-card {
    border: 1px solid var(--c3-border);
}

/* --- 风格变体 (动态适配主题) --- */

/* 1. 主卡风格 (对应参考图的白色卡片) */
/* 修复：在深色模式下变黑，橙色模式下变米色 */
.style-white {
    background-color: var(--c1-bg);
    color: var(--c1-text);
    /* 动态波点：使用 var(--c1-dot) */
    background-image: radial-gradient(var(--c1-dot) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
}

/* 2. 强调色风格 (对应参考图的蓝色卡片) */
/* 修复：使用 --c2-bg，这样在橙色模式下会自动变橙 */
.style-blue {
    background-color: var(--c2-bg);
    color: var(--c2-text);
    /* 对角线纹理 */
    background-image: 
        repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 8px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 8px);
}

/* 3. 对比色风格 (对应参考图的黑色卡片) */
/* 修复：这是一个反色卡片。在亮模式是黑，暗模式是白/深灰 */
.style-black {
    background-color: var(--c1-text); /* 背景色取反 */
    color: var(--c1-bg);              /* 文字色取反 */
    background-image: radial-gradient(rgba(128,128,128,0.2) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
}

/* 在深色模式下，黑卡如果变成白色太刺眼，我们让它保持深色但稍亮 */
[data-theme="dark"] .style-black {
    background-color: #2a2a2a;
    color: #ffffff;
}

/* --- 布局区域定义 --- */

/* 左上：个人信息 */
.ht-profile {
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 右上：个人形象 */
.ht-avatar-box {
    grid-column: 2 / 3;
    padding: 0;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}
.ht-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 中间：学校+技能 */
.ht-mixed {
    grid-column: 1 / -1;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* 底部：工作经历 */
.ht-job {
    grid-column: 1 / -1;
}

/* --- 内容排版细节 --- */

.serif-heading {
    font-family: var(--font-serif); /* 使用变量字体 */
    font-weight: 700;
    line-height: 1.1;
}

/* Profile 内容 */
.ht-name {
    font-size: 3rem;
    margin-bottom: 10px;
}
.ht-role {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
}
.ht-contact-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.ht-link {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
    color: inherit; /* 继承卡片文字颜色 */
}
.ht-link:hover { opacity: 1; text-decoration: underline; }

/* Skills Tags */
.ht-skill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.ht-tag {
    background: var(--c1-bg); /* 跟随主题背景 */
    color: var(--c2-bg);      /* 跟随主题强调色 */
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    transition: transform 0.2s;
}
.ht-tag:nth-child(even) { transform: rotate(1deg); }
.ht-tag:hover { transform: scale(1.05) rotate(0deg); }

/* School 部分 */
.ht-school-block {
    flex: 1;
    min-width: 240px;
    border-right: 1px solid rgba(255,255,255,0.3); /* 半透明分割线，适配任何底色 */
    padding-right: 30px;
}
[data-theme="light"] .ht-school-block { border-right-color: rgba(0,0,0,0.1); } /* 浅色模式下深色线 */

.ht-skills-block { flex: 2; }

/* 分割线标题 */
.ht-divider {
    grid-column: 1 / -1;
    border-top: 2px solid rgba(0,0,0,0.1); /* 纯灰色 */
    margin-top: 20px;
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
[data-theme="orange"] .ht-divider {
    border-top-color: rgba(255,255,255,0.5);
}
.ht-divider h3 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--c1-text);
}

/* 工作经历列表 */
.ht-job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--c1-dot);
    padding-bottom: 12px;
}
.ht-job-title { font-size: 1.4rem; font-weight: 700; }
.ht-job-company { font-size: 1rem; opacity: 0.7; margin-left: 10px; }
.ht-job-date { 
    background: var(--c1-bg);
    color: var(--c2-bg);
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    transition: transform 0.2s;
}
.ht-job-list { margin: 0; padding-left: 20px; }
.ht-job-list li { margin-bottom: 8px; line-height: 1.6; }

/* 响应式适配 */
@media (max-width: 768px) {
    .ht-grid { grid-template-columns: 1fr; }
    .ht-profile { order: 2; }
    .ht-avatar-box { order: 1; aspect-ratio: 16/9; max-height: 250px; }
    
    .ht-mixed { flex-direction: column; gap: 24px; }
    .ht-school-block { border-right: none; border-bottom: 1px solid var(--c1-dot); padding-bottom: 24px; padding-right: 0; width: 100%; }
    
    .ht-job-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ht-job-company { margin-left: 0; }
}