/* v7.2: 有设计感的简洁风格 - 参考 Linear/Notion */
:root {
    /* 颜色系统 */
    --bg: #ffffff;
    --bg-subtle: #f9fafb;
    --bg-elevated: #f3f4f6;

    /* 文字灰度 */
    --text: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-quaternary: #9ca3af;

    /* 边框 */
    --border: #e5e7eb;
    --border-subtle: #f3f4f6;

    /* 强调色 */
    --accent: #111827;
    --accent-subtle: rgba(17, 24, 39, 0.05);

    /* 字体 */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;

    /* 尺寸 */
    --max-width: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 450;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-contact {
    color: var(--text) !important;
    font-weight: 500;
}

/* 容器 */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero */
.hero {
    padding: 140px 0 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-quaternary);
    margin-bottom: 24px;
    font-weight: 450;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.hero-name {
    margin-bottom: 20px;
}

.name-line {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 8px;
}

.name-role {
    font-size: 1.25rem;
    font-weight: 450;
    color: var(--text-tertiary);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 32px;
    line-height: 1.65;
}

/* 统计 */
.hero-stats {
    display: flex;
    gap: 48px;
    margin-bottom: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-quaternary);
    font-weight: 450;
}

/* 按钮 */
.hero-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #374151;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text);
}

/* 章节 */
.section {
    padding: 64px 0;
    border-top: 1px solid var(--border-subtle);
}

.section-header {
    margin-bottom: 32px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* 经历卡片 - 新设计 */
.exp-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: visible;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.exp-card:hover {
    border-color: var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.exp-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
    background: var(--bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    position: relative;
}

.exp-card-header:hover {
    background: var(--bg-subtle);
}



.exp-logo {
    width: 44px;
    height: 44px;
    background: var(--bg-elevated);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.exp-meta { flex: 1; }

.exp-company {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.exp-position {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    font-weight: 450;
}

.exp-period {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
}

.exp-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-quaternary);
    transition: color 0.2s;
}

.exp-toggle:hover {
    color: var(--text-secondary);
}

.exp-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.exp-card.expanded .exp-toggle svg {
    transform: rotate(180deg);
}

.exp-card-body {
    padding: 0 20px 24px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: var(--bg);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.exp-card.expanded .exp-card-body {
    max-height: 5000px;
    opacity: 1;
}

/* 方向区块 */
.exp-direction {
    margin-top: 24px;
}

.exp-direction:first-child {
    margin-top: 0;
}

.direction-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.direction-highlight {
    padding: 16px 18px;
    background: var(--accent-subtle);
    border-radius: 6px;
    margin-bottom: 16px;
}

.direction-highlight p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 经历列表 - 紧凑排版 */
.direction-list {
    list-style: none;
}

.direction-list li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    border-bottom: 1px solid var(--border-subtle);
}

.direction-list li:last-child {
    border-bottom: none;
}

/* 素材展示 */
.media-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-subtle);
    border-radius: 6px;
    overflow-x: auto;
}

.media-thumb {
    flex-shrink: 0;
    width: 84px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.media-thumb:hover {
    opacity: 0.75;
}

.media-thumb img {
    width: 100%;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.media-name {
    font-size: 0.65rem;
    color: var(--text-quaternary);
    text-align: center;
    display: block;
    margin-top: 6px;
    font-family: var(--font-mono);
}

.media-thumb.video .video-play {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.video-play svg {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
}

/* 教育背景 */
.edu-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edu-card {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s;
}

.edu-card:hover {
    border-color: var(--border);
}

.edu-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    opacity: 0.6;
}

.edu-school {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.edu-degree {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.edu-period {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
}

/* 技能 */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill-category {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.skill-cat-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-quaternary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 12px;
    background: var(--bg-subtle);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 450;
    transition: all 0.15s;
}

.skill-tag:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.skill-tag.highlight {
    background: var(--text);
    color: #fff;
}

/* 兴趣爱好 */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.interest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-subtle);
    border-radius: 6px;
    transition: background 0.15s;
}

.interest-item:hover {
    background: var(--bg-elevated);
}

.interest-icon { font-size: 1.1rem; }
.interest-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 450;
}
.interest-detail {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
}

/* 联系方式 */
.section-contact {
    padding-bottom: 64px;
}

.contact-card {
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}

.contact-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-quaternary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 1.05rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 450;
    transition: all 0.15s;
}

.contact-method:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.method-icon {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.method-icon svg {
    width: 100%;
    height: 100%;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 40px;
    color: var(--text-quaternary);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-subtle);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #666;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.15s;
}

.lightbox-close:hover { color: #fff; }

.lightbox-body { max-width: 90vw; max-height: 90vh; }

.lightbox-body img,
.lightbox-body video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

#lightbox-img { display: block; }
#lightbox-video { display: none; }
.lightbox.video #lightbox-img { display: none; }
.lightbox.video #lightbox-video { display: block; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-thumbs {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    max-width: 90vw;
    overflow-x: auto;
    z-index: 10001;
}

.lightbox-thumb {
    flex-shrink: 0;
    width: 60px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.lightbox-thumb:hover { opacity: 0.8; }
.lightbox-thumb.active { opacity: 1; }

.lightbox-thumb img {
    width: 100%;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
}

.lightbox-thumb.active img { border-color: #fff; }

.lightbox-thumb .thumb-video {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid transparent;
}

.lightbox-thumb.active .thumb-video { border-color: #fff; }
.thumb-video svg { width: 16px; height: 16px; color: #fff; }

.thumb-name {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-family: var(--font-mono);
}

.lightbox-thumb.active .thumb-name { color: #fff; }

/* ========== 博客页面 ========== */

/* 导航栏活跃状态 */
.nav-active {
    color: var(--text) !important;
    font-weight: 500;
}

/* 博客列表页 */
.blog-page {
    padding: 120px 0 80px;
    min-height: calc(100vh - 80px);
}

.blog-header {
    margin-bottom: 48px;
}

.blog-page-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.blog-page-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* 文章列表 */
.blog-list {
    display: flex;
    flex-direction: column;
}

.blog-item {
    border-bottom: 1px solid var(--border-subtle);
}

.blog-item:first-child {
    border-top: 1px solid var(--border-subtle);
}

.blog-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    text-decoration: none;
    transition: opacity 0.15s;
}

.blog-item-link:hover {
    opacity: 0.7;
}

.blog-item-content {
    flex: 1;
}

.blog-item-date {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
    display: block;
    margin-bottom: 8px;
}

.blog-item-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    line-height: 1.4;
}

.blog-item-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.blog-item-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.blog-tag {
    padding: 3px 10px;
    background: var(--bg-subtle);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 450;
}

.blog-item-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-quaternary);
}

.blog-item-arrow svg {
    width: 100%;
    height: 100%;
}

.blog-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--text-quaternary);
    font-size: 0.95rem;
}

/* 文章详情页 */
.blog-post-page {
    padding: 120px 0 80px;
    min-height: calc(100vh - 80px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 450;
    margin-bottom: 40px;
    transition: color 0.15s;
}

.back-link:hover {
    color: var(--text);
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-subtle);
}

.post-date {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
    display: block;
    margin-bottom: 12px;
}

.post-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1.3;
    margin-bottom: 16px;
}

.post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Markdown 内容样式 */
.markdown-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
}

.markdown-body h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin: 40px 0 16px;
    letter-spacing: -0.01em;
}

.markdown-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 32px 0 12px;
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body ul, .markdown-body ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.markdown-body li {
    margin-bottom: 6px;
}

.markdown-body strong {
    color: var(--text);
    font-weight: 600;
}

.markdown-body a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.markdown-body a:hover {
    opacity: 0.7;
}

.markdown-body blockquote {
    border-left: 3px solid var(--border);
    padding-left: 16px;
    margin: 20px 0;
    color: var(--text-tertiary);
    font-style: italic;
}

.markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--text);
}

.markdown-body pre {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 40px 0;
}

.markdown-body img {
    max-width: 100%;
    border-radius: 6px;
    margin: 20px 0;
}

.markdown-body em {
    color: var(--text-tertiary);
}

/* 文章底部导航 */
.post-nav {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

/* 响应式 */
@media (max-width: 640px) {
    .navbar-inner { padding: 14px 20px; }
    .nav-links { display: none; }

    .hero {
        padding: 120px 0 60px;
        text-align: center;
    }

    .name-line { font-size: 2.2rem; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-stats { justify-content: center; }
    .hero-actions { justify-content: center; }

    .container { padding: 0 20px; }

    .exp-card-header { padding: 16px; }
    .exp-card-body { padding: 0 16px 20px; }

    .contact-card { padding: 32px 20px; }
    .contact-methods { flex-direction: column; }
    .contact-method { justify-content: center; }
}
