/* ===== CSS 变量 ===== */
:root {
    /* 浅色主题 */
    --bg-default: #ffffff;
    --bg-muted: #f6f8fa;
    --fg-default: #1f2328;
    --fg-muted: #656d76;
    --border-default: #d0d7de;
    --border-muted: #d8dee4;
    --accent-fg: #0969da;
    --accent-emphasis: #0969da;
    --accent-muted: rgba(84, 174, 255, 0.4);
    
    /* 侧边栏 */
    --sidebar-width: 256px;
    --sidebar-bg: var(--bg-default);
    
    /* 阴影 */
    --shadow-sm: 0 1px 0 rgba(27, 31, 36, 0.04);
    --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15);
    
    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

:root[data-theme="dark"] {
    /* 深色主题 */
    --bg-default: #0d1117;
    --bg-muted: #161b22;
    --fg-default: #e6edf3;
    --fg-muted: #8b949e;
    --border-default: #30363d;
    --border-muted: #21262d;
    --accent-fg: #58a6ff;
    --accent-emphasis: #1f6feb;
    --accent-muted: rgba(56, 139, 253, 0.4);
    
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-default);
    color: var(--fg-default);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== 页面加载进度条 ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 10000;
    background-color: transparent;
    pointer-events: none;
}

.page-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-fg), var(--accent-emphasis));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-fg);
}

.page-loader.loading .page-loader-bar {
    width: 90%;
    animation: loading 1.5s ease-in-out infinite;
}

.page-loader.complete .page-loader-bar {
    width: 100%;
    transition: width 0.2s ease, opacity 0.3s ease 0.2s;
}

.page-loader.hide {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes loading {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

a {
    color: var(--accent-fg);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

/* ===== 侧边栏 ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-default);
    min-height: 48px;
    position: sticky;
    top: 0;
    background-color: var(--sidebar-bg);
    z-index: 1;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg-default);
    line-height: 1.2;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.theme-menu-wrapper {
    position: relative;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--fg-muted);
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-muted);
    color: var(--fg-default);
}

.theme-icon,
.theme-icon-header {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: currentColor;
}

.theme-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background-color: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.theme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--fg-default);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: left;
}

.theme-menu-item:hover {
    background-color: var(--bg-muted);
}

.theme-menu-item.active {
    background-color: var(--bg-muted);
    font-weight: 500;
}

.theme-menu-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: currentColor;
}

.theme-menu-text {
    flex: 1;
}

.theme-menu-check {
    flex-shrink: 0;
    color: var(--accent-fg);
    font-size: 14px;
    font-weight: 600;
    display: none;
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--fg-muted);
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-close:hover {
    background-color: var(--bg-muted);
    color: var(--fg-default);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--fg-default);
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0;
    transition: background-color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background-color: var(--bg-muted);
    text-decoration: none;
}

.nav-link.active {
    font-weight: 600;
    background-color: rgba(9, 105, 218, 0.1);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background-color: var(--accent-fg);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    flex-shrink: 0;
    color: var(--fg-muted);
    width: 18px;
    height: 18px;
}

.nav-link.active .nav-icon {
    color: var(--fg-default);
}

.nav-link-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.nav-link-label {
    font-weight: 600;
    color: var(--fg-default);
}

.nav-link-desc {
    font-size: 12px;
    color: var(--fg-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group {
    margin-top: 24px;
    padding-top: 8px;
}

.nav-group-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--fg-muted);
    padding: 8px 16px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-default);
    text-align: center;
    font-size: 12px;
    color: var(--fg-muted);
    line-height: 1.6;
}

.footer-text {
    margin: 4px 0;
}

.footer-text a {
    color: var(--fg-muted);
}

.footer-text a:hover {
    color: var(--accent-fg);
    text-decoration: underline;
}

/* ===== 侧边栏遮罩层 ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== 主容器 ===== */
.main-container {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 主内容头部 ===== */
.main-header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: saturate(120%) blur(8px);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    min-height: 48px;
}

[data-theme="dark"] .main-header {
    background-color: rgba(13, 17, 23, 0.7);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--fg-muted);
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-toggle:hover {
    background-color: var(--bg-muted);
    color: var(--fg-default);
}

.main-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg-default);
    display: block;
    flex: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle-header {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--fg-muted);
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-left: auto;
}

.theme-toggle-header:hover {
    background-color: var(--bg-muted);
    color: var(--fg-default);
}

@media (max-width: 1012px) {
    .theme-menu-wrapper {
        margin-left: auto;
    }
    
    .theme-menu {
        right: 0;
    }
}

/* ===== 主内容 ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    max-height: 100%;
}

.content-wrapper {
    max-width: 768px;
    margin: 0 auto;
    padding: 32px 64px;
}

/* ===== Hero 区域 ===== */
.hero-section {
    margin-bottom: 32px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    color: var(--fg-default);
}

.hero-greeting {
    font-size: 0.85em;
}

.hero-highlight {
    position: relative;
    display: inline;
    background: transparent;
    color: var(--accent-fg);
    padding: 0;
    border-radius: 0;
    z-index: 0;
}

.hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 35%;
    background: var(--accent-muted);
    z-index: -1;
    animation: highlight-slide 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes highlight-slide {
    to {
        width: 100%;
    }
}

.hero-subtitle {
    font-size: 14px;
    color: var(--fg-muted);
    margin-top: 16px;
    margin-bottom: 16px;
}

/* ===== 信息列表 ===== */
.info-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
    color: var(--fg-default);
}

.info-icon {
    flex-shrink: 0;
    color: var(--fg-muted);
}

.info-item a {
    color: var(--fg-default);
    text-decoration: none;
}

.info-item a:hover {
    color: var(--accent-fg);
    text-decoration: underline;
}

/* ===== 操作按钮 ===== */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    height: 32px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border-default);
    background-color: var(--bg-default);
    color: var(--fg-default);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--bg-muted);
    border-color: var(--border-muted);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--bg-default);
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--bg-muted);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    flex-shrink: 0;
    color: var(--fg-muted);
}

.btn-secondary {
    background-color: var(--bg-muted);
    border-color: var(--border-default);
}

.btn-secondary:hover {
    background-color: var(--bg-default);
    border-color: var(--border-muted);
}

/* ===== 404 错误页面 ===== */
.error-content {
    text-align: center;
    padding: 40px 20px;
}

.error-text {
    font-size: 16px;
    color: var(--fg-muted);
    line-height: 1.8;
    margin: 16px 0;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .error-content {
        padding: 32px 16px;
    }

    .error-text {
        font-size: 14px;
    }

    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .error-actions .btn {
        width: 100%;
    }
}

/* ===== 分隔线 ===== */
.divider {
    margin: 24px 0;
    border: none;
    border-top: 1px solid var(--border-default);
}

/* ===== 简介列表 ===== */
.bio-list {
    list-style: none;
    padding-left: 2em;
    margin: 0 0 32px 0;
}

.bio-list li {
    margin-bottom: 4px;
    line-height: 1.6;
}

.bio-list li::marker {
    content: '• ';
    color: var(--fg-muted);
}

/* ===== 关于我区域 ===== */
.about-section {
    margin-bottom: 32px;
}

.section-heading {
    font-size: 24px;
    font-weight: 600;
    color: var(--fg-default);
    margin-bottom: 16px;
}

.section-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--fg-default);
    margin-bottom: 16px;
}

.section-text:last-child {
    margin-bottom: 0;
}

/* ===== GPG 详情 ===== */
.info-item-gpg {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
}

.info-item-gpg > a {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: fit-content;
}

.gpg-details {
    width: 100%;
    max-width: 100%;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    box-sizing: border-box;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    padding: 0;
    opacity: 0;
}

.gpg-details.active {
    max-height: 500px;
    margin-top: 12px;
    padding: 16px;
    background-color: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    opacity: 1;
}

/* ===== 微信二维码详情 ===== */
.wechat-qr-details {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    margin-left: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    padding: 0;
    opacity: 0;
}

.wechat-qr-details.active {
    max-height: 400px;
    margin-top: 8px;
    padding: 16px;
    background-color: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    opacity: 1;
}

.wechat-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wechat-qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    background-color: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    min-height: 200px;
    min-width: 200px;
}

.wechat-qr-code svg {
    max-width: 100%;
    height: auto;
}

.wechat-qr-tip {
    font-size: 12px;
    color: var(--fg-muted);
    text-align: center;
    margin: 0;
}

/* ===== 主内容区域的微信二维码 ===== */
.wechat-qr-details-main {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    margin-left: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    padding: 0;
    opacity: 0;
}

.wechat-qr-details-main.active {
    max-height: 400px;
    margin-top: 16px;
    padding: 16px;
    background-color: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    opacity: 1;
}

.gpg-info {
    font-size: 13px;
    width: 100%;
}

.gpg-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    line-height: 1.6;
    flex-wrap: wrap;
    gap: 4px;
}

.gpg-row:last-child {
    margin-bottom: 0;
}

.gpg-label {
    color: var(--fg-muted);
    min-width: 80px;
    flex-shrink: 0;
}

.gpg-value {
    color: var(--fg-default);
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.gpg-row .gpg-value {
    word-break: normal;
    overflow-wrap: break-word;
}

.gpg-fingerprint {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: break-word;
}

.fingerprint-part {
    display: inline;
    margin-right: 4px;
}

.fingerprint-part:last-child {
    margin-right: 0;
}

.gpg-download {
    color: var(--accent-fg);
    text-decoration: none;
}

.gpg-download:hover {
    text-decoration: underline;
}

.gpg-or {
    display: inline-block;
    margin: 0 8px;
    color: var(--fg-muted);
    font-size: 12px;
}

.gpg-copy-btn {
    font-size: 12px;
    color: var(--fg-default);
    background-color: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gpg-copy-btn:hover {
    background-color: var(--bg-default);
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(20px);
    padding: 8px 16px;
    background-color: var(--fg-default);
    color: var(--bg-default);
    font-size: 13px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1001;
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Cookie 许可弹窗 ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: saturate(120%) blur(8px);
    border-top: 1px solid var(--border-default);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
}

[data-theme="dark"] .cookie-consent {
    background-color: rgba(13, 17, 23, 0.7);
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1012px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-consent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-consent-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cookie-consent-icon {
    flex-shrink: 0;
    color: var(--accent-fg);
}

.cookie-consent-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--fg-default);
    margin: 0;
}

.cookie-consent-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background-color: transparent;
    color: var(--fg-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cookie-consent-close:hover {
    background-color: var(--bg-muted);
    color: var(--fg-default);
}

.cookie-consent-close svg {
    width: 16px;
    height: 16px;
}

.cookie-consent-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-consent-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--fg-default);
    margin: 0;
}

.cookie-consent-list {
    margin: 0;
    padding-left: 24px;
    list-style-type: disc;
    color: var(--fg-default);
}

.cookie-consent-list li {
    font-size: 14px;
    line-height: 1.6;
    margin: 4px 0;
    color: var(--fg-default);
}

.cookie-consent-link {
    color: var(--accent-fg);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-consent-link:hover {
    color: var(--accent-emphasis);
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border-default);
    background-color: var(--bg-default);
    color: var(--fg-default);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cookie-consent-btn:hover {
    background-color: var(--bg-muted);
    border-color: var(--border-muted);
}

.cookie-consent-btn-accept {
    background-color: var(--accent-fg);
    color: #ffffff;
    border-color: var(--accent-fg);
}

.cookie-consent-btn-accept:hover {
    background-color: var(--accent-emphasis);
    border-color: var(--accent-emphasis);
    color: #ffffff;
}

.cookie-consent-btn-decline {
    background-color: var(--bg-default);
    color: var(--fg-default);
}

.cookie-consent-btn-decline:hover {
    background-color: var(--bg-muted);
}

@media (max-width: 768px) {
    .cookie-consent {
        padding: 16px;
    }

    .cookie-consent-content {
        gap: 12px;
    }

    .cookie-consent-title {
        font-size: 16px;
    }

    .cookie-consent-text,
    .cookie-consent-list li {
        font-size: 13px;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-consent-btn {
        width: 100%;
    }
}

@media (max-width: 1012px) {
    .cookie-consent-content {
        max-width: calc(100% - 32px);
    }
}

/* ===== 项目列表 ===== */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-item {
    padding: 20px;
    background-color: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-item:hover {
    border-color: var(--accent-fg);
    box-shadow: var(--shadow-sm);
}

.project-header {
    margin-bottom: 8px;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--fg-default);
    margin: 0;
    line-height: 1.4;
}

.project-name a {
    color: var(--fg-default);
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-name a:hover {
    color: var(--accent-fg);
    text-decoration: none;
}

.project-description {
    font-size: 14px;
    color: var(--fg-muted);
    margin: 8px 0 12px 0;
    line-height: 1.6;
}

.project-link {
    margin-top: 12px;
}

.project-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--accent-fg);
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-url:hover {
    color: var(--accent-emphasis);
    text-decoration: underline;
}

.project-link-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.project-url:hover .project-link-icon {
    opacity: 1;
}

/* ===== 友情链接 ===== */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.friend-item {
    padding: 20px;
    background-color: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.friend-item:hover {
    border-color: var(--accent-fg);
    box-shadow: var(--shadow-sm);
}

.friend-header {
    margin-bottom: 8px;
}

.friend-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--fg-default);
    margin: 0;
    line-height: 1.4;
}

.friend-name a {
    color: var(--fg-default);
    text-decoration: none;
    transition: color 0.2s ease;
}

.friend-name a:hover {
    color: var(--accent-fg);
    text-decoration: none;
}

.friend-description {
    font-size: 14px;
    color: var(--fg-muted);
    margin: 8px 0 12px 0;
    line-height: 1.6;
}

.friend-link {
    margin-top: 12px;
}

.friend-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--accent-fg);
    text-decoration: none;
    transition: color 0.2s ease;
}

.friend-url:hover {
    color: var(--accent-emphasis);
    text-decoration: underline;
}

.friend-link-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.friend-url:hover .friend-link-icon {
    opacity: 1;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1012px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .main-container {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .theme-toggle-header {
        display: flex;
    }

    .content-wrapper {
        padding: 32px 16px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 85%;
        max-width: 360px;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .content-wrapper {
        padding: 24px 16px;
    }

    .gpg-details {
        margin-left: 0;
    }

    .gpg-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .gpg-label {
        min-width: auto;
    }

    .gpg-fingerprint {
        font-size: 11px;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 544px) {
    .sidebar {
        width: 85%;
        max-width: 320px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .gpg-fingerprint {
        font-size: 10px;
    }

    .gpg-row .gpg-value {
        font-size: 12px;
    }
}

/* ===== 滚动条样式 ===== */
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
    background-color: var(--border-default);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-muted);
}

/* ===== 隐私政策 ===== */
.privacy-section {
    margin-top: 32px;
}

.privacy-content {
    max-width: 100%;
}

.privacy-intro {
    font-size: 15px;
    color: var(--fg-default);
    line-height: 1.7;
    margin-bottom: 32px;
    padding: 20px;
    background-color: var(--bg-muted);
    border-left: 3px solid var(--accent-fg);
    border-radius: 4px;
}

.privacy-heading {
    font-size: 20px;
    font-weight: 600;
    color: var(--fg-default);
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-default);
}

.privacy-heading:first-of-type {
    margin-top: 0;
}

.privacy-text {
    font-size: 14px;
    color: var(--fg-default);
    line-height: 1.8;
    margin: 16px 0;
}

.privacy-list {
    margin: 16px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.privacy-list li {
    font-size: 14px;
    color: var(--fg-default);
    line-height: 1.8;
    margin: 8px 0;
}

.privacy-list li strong {
    color: var(--fg-default);
    font-weight: 600;
}

.privacy-content a {
    color: var(--accent-fg);
    text-decoration: none;
    transition: color 0.2s ease;
}

.privacy-content a:hover {
    color: var(--accent-emphasis);
    text-decoration: underline;
}

.privacy-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-default);
    text-align: center;
}

.privacy-update-date {
    font-size: 13px;
    color: var(--fg-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .privacy-heading {
        font-size: 18px;
    }

    .privacy-intro {
        font-size: 14px;
        padding: 16px;
    }

    .privacy-text,
    .privacy-list li {
        font-size: 13px;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .sidebar,
    .main-header,
    .menu-toggle,
    .sidebar-overlay {
        display: none;
    }

    .main-container {
        margin-left: 0;
    }

    .content-wrapper {
        max-width: 100%;
        padding: 0;
    }
}

/* ===== PJAX 加载状态 ===== */
html.pjax-loading {
    cursor: wait;
}

html.pjax-loading .main-content {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* PJAX 过渡动画（可选） */
.main-content {
    transition: opacity 0.2s ease;
}

/* 禁用 PJAX 的链接样式提示（可选） */
a.no-pjax::after {
    content: '';
}

/* ===== 归档页面样式 ===== */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.archive-item {
    padding: 20px;
    background-color: var(--bg-muted);
    border-radius: 8px;
    border: 1px solid var(--border-default);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.archive-item:hover {
    border-color: var(--accent-fg);
    box-shadow: var(--shadow-md);
}

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

.archive-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.archive-title a {
    color: var(--fg-default);
    text-decoration: none;
}

.archive-title a:hover {
    color: var(--accent-fg);
    text-decoration: underline;
}

.archive-date {
    font-size: 14px;
    color: var(--fg-muted);
    white-space: nowrap;
}

.archive-excerpt {
    margin: 0;
    color: var(--fg-muted);
    line-height: 1.6;
}

/* ===== 文章页面样式 ===== */
.post-article {
    max-width: 100%;
}

.post-header {
    margin-bottom: 24px;
}

.post-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--fg-default);
    margin-bottom: 16px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--fg-muted);
}

.post-date,
.post-updated {
    display: inline-block;
}

.post-content {
    line-height: 1.8;
    color: var(--fg-default);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--fg-default);
}

.post-content h1 {
    font-size: 28px;
}

.post-content h2 {
    font-size: 24px;
}

.post-content h3 {
    font-size: 20px;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 16px;
    padding-left: 2em;
}

.post-content code {
    background-color: var(--bg-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.post-content pre {
    background-color: var(--bg-muted);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}

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

.post-content blockquote {
    border-left: 4px solid var(--accent-fg);
    padding-left: 16px;
    margin-left: 0;
    margin-bottom: 16px;
    color: var(--fg-muted);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.post-content a {
    color: var(--accent-fg);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--accent-emphasis);
}

/* 关于我内容支持 Markdown */
.about-content {
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 16px;
}

.about-content p:last-child {
    margin-bottom: 0;
}
