/* Hero Section */
.hero {
    padding: 4rem 0 3rem 0;
    /* 从 5rem 0 4rem 0 减少到 4rem 0 3rem 0 */
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 850px;
    /* 从 800px 增加到 850px */
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 240px;
    height: 300px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 2.8rem;
    /* 从 2.5rem 增加到 2.8rem */
    font-weight: normal;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    /* 从 1.1rem 增加到 1.2rem */
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: normal;
}

.hero-description {
    font-size: 1.05rem;
    /* 从 1rem 增加到 1.05rem */
    line-height: 1.9;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* CV Download Button */
.cv-download {
    margin-top: 1.5rem;
}

.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    text-decoration: none;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cv-button:hover {
    background-color: var(--khaki);
    border-color: var(--khaki);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.2);
}

.cv-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.cv-button:hover i {
    transform: scale(1.1);
}

.cv-button:visited {
    color: var(--text-primary);
}

.cv-button:hover:visited {
    color: var(--bg-primary);
}

/* Timeline (Education) */
.timeline {
    position: relative;
}

.timeline::before {
    display: none;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    /* 从 2.5rem 减少到 2rem */
    padding-bottom: 1.25rem;
    /* 从 1.5rem 减少到 1.25rem */
    border-bottom: 1px solid var(--border-color);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-marker {
    display: none;
}

.timeline-content {
    background-color: transparent;
    padding: 0;
}

.timeline-header {
    display: block;
    margin-bottom: 0.5rem;
    /* 从 0.75rem 减少到 0.5rem */
}

.timeline-header h3 {
    font-size: 1.4rem;
    /* 从 1.3rem 增加到 1.4rem */
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-date {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 1rem;
    /* 从 0.95rem 增加到 1rem */
    font-style: italic;
}

.timeline-location {
    font-weight: 600;
    /* 从 500 增加到 600，更突出学校名称 */
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    /* 从 1rem 增加到 1.05rem */
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    /* 从 1rem 增加到 1.05rem */
}

/* Experience Grid */
.experience-grid {
    display: block;
}

.experience-card {
    background-color: transparent;
    padding: 0 0 1.25rem 0;
    /* 从 1.5rem 减少到 1.25rem */
    margin-bottom: 1.75rem;
    /* 从 2rem 减少到 1.75rem */
    border-bottom: 1px solid var(--border-color);
}

.experience-card:last-child {
    border-bottom: none;
}

.experience-icon {
    display: none;
}

.experience-card h3 {
    font-size: 1.4rem;
    /* 从 1.3rem 增加到 1.4rem */
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.experience-company {
    font-weight: 700;
    /* 从 600 增加到 700，更突出公司名称 */
    color: var(--accent-color);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    /* 从 1.05rem 增加到 1.1rem */
}

.experience-date {
    color: var(--accent-color);
    font-size: 1rem;
    /* 从 0.95rem 增加到 1rem */
    margin-bottom: 0.75rem;
    font-style: italic;
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.9;
    /* 从 1.8 增加到 1.9 */
    font-size: 1.05rem;
    /* 从 1rem 增加到 1.05rem */
}

/* 加强 description 中的关键信息 */
.experience-description strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Projects Grid */
.projects-grid {
    display: block;
}

.project-card {
    background-color: transparent;
    padding: 0 0 1.25rem 0;
    /* 从 1.5rem 减少到 1.25rem */
    margin-bottom: 1.75rem;
    /* 从 2rem 减少到 1.75rem */
    border-bottom: 1px solid var(--border-color);
}

.project-card:last-child {
    border-bottom: none;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.project-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.project-header h3 {
    font-size: 1.4rem;
    /* 从 1.3rem 增加到 1.4rem */
    color: var(--text-primary);
    font-weight: 600;
}

/* GitHub Stars 样式 */
.project-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--khaki);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.project-stars i {
    font-size: 0.85rem;
    color: var(--khaki);
}

.stars-count {
    color: var(--text-secondary);
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--text-light);
    font-size: 1.1rem;
    /* 从 1rem 增加到 1.1rem */
    transition: color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.project-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* GitHub 链接样式 */
.github-link:hover {
    color: var(--text-primary);
}

/* Demo 链接样式 - 使用卡其色区分 */
.demo-link {
    color: var(--khaki);
}

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

.project-tags {
    display: inline;
    margin-bottom: 0.5rem;
}

.tag {
    background-color: transparent;
    color: var(--text-light);
    padding: 0;
    border-radius: 0;
    font-size: 0.9rem;
    /* 从 0.85rem 增加到 0.9rem */
    font-weight: normal;
    font-style: italic;
}

.tag::after {
    content: ', ';
}

.tag:last-child::after {
    content: '';
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    /* 从 1rem 增加到 1.05rem */
    margin-top: 0.5rem;
}

/* Publications */
.publications-list {
    margin: 0;
}

.publication-item {
    background-color: transparent;
    padding: 0 0 1.25rem 0;
    /* 从 1.5rem 减少到 1.25rem */
    margin-bottom: 1.75rem;
    /* 从 2rem 减少到 1.75rem */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.publication-item:last-child {
    border-bottom: none;
}

/* 论文图片 */
.publication-image {
    flex-shrink: 0;
    width: 280px;
    max-width: 35%;
}

.publication-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.publication-image img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 论文内容 */
.publication-content {
    flex: 1;
    min-width: 0;
    /* 防止 flex 项溢出 */
}

.publication-title {
    font-size: 1.25rem;
    /* 从 1.15rem 增加到 1.25rem */
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-weight: 600;
}

.publication-authors {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
    /* 从 1rem 增加到 1.05rem */
}

.publication-venue {
    color: var(--accent-color);
    /* 从 text-light 改为 accent-color，突出会议/期刊 */
    font-weight: 500;
    /* 从 normal 改为 500 */
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    /* 从 0.9rem 增加到 0.95rem */
    font-style: italic;
}

.publication-venue i {
    display: none;
}

.publication-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Awards Grid */
.awards-grid {
    display: block;
}

.award-card {
    background-color: transparent;
    padding: 0 0 1rem 0;
    margin-bottom: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.award-card:last-child {
    border-bottom: none;
}

.award-icon {
    display: none;
}

.award-card h3 {
    font-size: 1.2rem;
    /* 从 1.1rem 增加到 1.2rem */
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
    /* 从 normal 改为 600，加粗奖项名称 */
}

.award-venue {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
    /* 从 0.95rem 增加到 1rem */
}

.award-date {
    color: var(--accent-color);
    /* 从 text-light 改为 accent-color */
    font-weight: 500;
    /* 从 normal 改为 500 */
    font-size: 0.95rem;
    /* 从 0.9rem 增加到 0.95rem */
    font-style: italic;
}

/* Talks */
.talks-list {
    margin: 0;
}

.talk-item {
    background-color: transparent;
    padding: 0 0 1.25rem 0;
    /* 从 1.5rem 减少到 1.25rem */
    margin-bottom: 1.75rem;
    /* 从 2rem 减少到 1.75rem */
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.talk-item:last-child {
    border-bottom: none;
}

.talk-content {
    margin-bottom: 0.75rem;
}

.talk-title {
    font-size: 1.25rem;
    /* 从 1.1rem 增加到 1.25rem */
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
    /* 从 normal 改为 600，加粗演讲标题 */
}

.talk-title i {
    display: none;
}

.talk-venue {
    color: var(--text-secondary);
    font-weight: 500;
    /* 从 normal 改为 500 */
    margin-bottom: 0.25rem;
    font-size: 1rem;
    /* 从 0.95rem 增加到 1rem */
}

.talk-date {
    color: var(--accent-color);
    /* 从 text-light 改为 accent-color */
    font-size: 0.95rem;
    /* 从 0.9rem 增加到 0.95rem */
    margin-bottom: 0.5rem;
    font-style: italic;
}

.talk-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    /* 从 0.95rem 增加到 1rem */
    margin-bottom: 0.75rem;
}

.talk-links {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
}

/* Blog Grid */
.blog-grid {
    display: block;
}

.blog-card {
    background-color: transparent;
    padding: 0 0 1.25rem 0;
    /* 从 1.5rem 减少到 1.25rem */
    margin-bottom: 1.75rem;
    /* 从 2rem 减少到 1.75rem */
    border-bottom: 1px solid var(--border-color);
}

.blog-card:last-child {
    border-bottom: none;
}

.blog-date {
    color: var(--accent-color);
    /* 从 text-light 改为 accent-color */
    font-size: 0.95rem;
    /* 从 0.9rem 增加到 0.95rem */
    font-weight: 500;
    /* 从 normal 改为 500 */
    margin-bottom: 0.25rem;
    font-style: italic;
}

.blog-title {
    font-size: 1.25rem;
    /* 从 1.1rem 增加到 1.25rem */
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    /* 从 normal 改为 600，加粗博客标题 */
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    /* 从 0.95rem 增加到 1rem */
}

.blog-link {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    /* 从 0.9rem 增加到 0.95rem */
}

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

.blog-link i {
    font-size: 0.8rem;
    /* 从 0.75rem 增加到 0.8rem */
}

/* Tech Stack - Layered Architecture Map */
.tech-stack-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.tech-stack-map {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.tech-stack-layer {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    transition: background-color 0.2s ease;
}

.tech-stack-layer:last-child {
    border-bottom: none;
}

.tech-stack-layer:hover {
    background-color: var(--bg-secondary);
}

.tech-layer-label {
    width: 260px;
    flex-shrink: 0;
    padding: 1.25rem 1.5rem 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-right: 2px solid var(--border-color);
}

.tech-layer-indicator {
    width: 4px;
    align-self: stretch;
    border-radius: 2px;
    flex-shrink: 0;
}

.tech-layer-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.tech-layer-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0 1.25rem 1.5rem;
}

.tech-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.tech-item:hover {
    border-color: var(--khaki);
    color: var(--khaki);
}

.tech-item-note {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: normal;
    font-style: italic;
}

.tech-item:hover .tech-item-note {
    color: var(--khaki-light);
}

.tech-stack-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    user-select: none;
}

/* Responsive - Home page specific */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-image img {
        width: 200px;
        height: 250px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .social-links {
        justify-content: center;
    }

    .cv-download {
        text-align: center;
    }

    .cv-button {
        font-size: 0.95rem;
        padding: 0.65rem 1.25rem;
    }

    /* 在移动设备上，论文图片和内容垂直堆叠 */
    .publication-item {
        flex-direction: column;
    }

    .publication-image {
        width: 100%;
        max-width: 100%;
    }

    /* 移动端项目标题和 stars 布局 */
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .project-title-row {
        flex-wrap: wrap;
        width: 100%;
    }

    .project-stars {
        font-size: 0.9rem;
    }

    .project-links {
        margin-top: 0.25rem;
    }

    /* 移动端技术栈样式 */
    .tech-stack-layer {
        flex-direction: column;
    }

    .tech-layer-label {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
    }

    .tech-layer-items {
        padding: 1rem 0;
    }

    .tech-item {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}
