/* ============================================
   个人主页样式表
   紫色系主题 · 响应式 · 原生CSS3
   组织结构：基础 → 布局 → 组件 → 工具
   ============================================ */

/* ====== 1. 基础 / Reset & Variables ====== */
:root {
    /* 主色系 - 紫色 */
    --purple-50:  #f5f0ff;
    --purple-100: #ede0ff;
    --purple-200: #d4b8ff;
    --purple-300: #b388ff;
    --purple-400: #9c6dff;
    --purple-500: #7c4dff;
    --purple-600: #6a1fff;
    --purple-700: #5a18e0;
    --purple-800: #4a14b8;
    --purple-900: #3a0f8f;

    /* 中性色 */
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e8e8e8;
    --gray-300: #d0d0d0;
    --gray-400: #a0a0a0;
    --gray-500: #808080;
    --gray-600: #606060;
    --gray-700: #404040;
    --gray-800: #2a2a2a;
    --gray-900: #1a1a1a;
    --black: #000000;

    /* 语义色 */
    --bg: var(--gray-50);
    --surface: var(--white);
    --text: var(--gray-800);
    --text-secondary: var(--gray-500);
    --primary: var(--purple-500);
    --primary-dark: var(--purple-700);
    --primary-light: var(--purple-100);
    --accent: var(--purple-300);
    --border: var(--gray-200);
    --shadow: 0 2px 12px rgba(124, 77, 255, 0.08);
    --shadow-hover: 0 8px 32px rgba(124, 77, 255, 0.15);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 间距 */
    --nav-height: 64px;
    --container-max: 1100px;
    --section-padding: 80px 0;

    /* 动效 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

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

/* 紫色圆点光标 */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--purple-500);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 2px solid var(--purple-400);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
}

/* 悬停可交互元素时光标变大 */
.cursor-dot.hovering {
    width: 4px;
    height: 4px;
}

.cursor-ring.hovering {
    width: 52px;
    height: 52px;
    border-color: var(--purple-600);
    opacity: 1;
}

/* 移动端隐藏自定义光标 */
@media (max-width: 768px) {
    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

/* 桌面端隐藏默认光标 */
@media (min-width: 769px) and (hover: hover) {
    body {
        cursor: none;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ====== 2. 布局 ====== */

/* 桌面端/移动端显隐 */
.nav-desktop {
    display: flex;
    align-items: center;
}

.nav-mobile {
    display: none;
}

.section {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--section-padding);
    padding-left: 24px;
    padding-right: 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section-en {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 8px;
}

/* ====== 3. 组件 ====== */

/* --- 3.1 顶部导航 --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.nav-logo:hover img {
    transform: scale(1.06);
}

.nav-menu {
    gap: 4px;
}

.nav-link {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.nav-link .nav-en {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 400;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-link.active .nav-en {
    color: var(--primary-300);
}

/* 页面语言切换 */
.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--gray-500);
    cursor: pointer;
    flex-shrink: 0;
}

.language-option {
    min-width: 30px;
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    transition: var(--transition-fast);
}

.language-option[data-language="zh"] {
    background: var(--primary);
    color: var(--white);
}

html[lang="en"] .language-option[data-language="zh"] {
    background: transparent;
    color: var(--gray-500);
}

html[lang="en"] .language-option[data-language="en"] {
    background: var(--primary);
    color: var(--white);
}

.language-switch:hover {
    border-color: var(--purple-300);
}

/* Table 目录按钮 */
.table-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary-light);
    border: 1px solid var(--purple-200);
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.table-btn:hover {
    background: var(--purple-200);
}

.table-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Table 下拉目录 */
.table-dropdown {
    position: absolute;
    top: 100%;
    right: 24px;
    margin-top: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 220px;
    display: none;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateY(-8px);
    transition: var(--transition);
}

.table-dropdown.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--gray-600);
    transition: var(--transition-fast);
}

.dropdown-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* 汉堡按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.ham-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active .ham-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active .ham-line:nth-child(2) {
    opacity: 0;
}
.hamburger.active .ham-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 抽屉侧边栏 */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

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

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.drawer-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
    padding: 4px;
}

.drawer-menu {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.drawer-link {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--gray-700);
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--gray-100);
}

.drawer-link:hover,
.drawer-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-bottom-color: transparent;
}

/* 抽屉遮罩 */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* --- 3.2 阅读进度条 + 回顶按钮 --- */
.progress-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 200px;
    background: var(--gray-200);
    border-radius: 2px;
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.progress-container.visible {
    opacity: 1;
}

.progress-bar {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--purple-400), var(--purple-600));
    border-radius: 2px;
    transition: height 0.1s linear;
}

.progress-text {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* --- 3.3 首页 Hero --- */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 背景图片层 */
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('hero bg photo.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* 半透明遮罩层 — 保证文字可读性 */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.82) 0%,
        rgba(245, 240, 255, 0.72) 50%,
        rgba(237, 224, 255, 0.65) 100%);
    z-index: 1;
}

/* Hero → About 渐变过渡区 */
.hero-transition {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 30%,
        rgba(255, 255, 255, 0.85) 60%,
        rgba(250, 250, 250, 1) 100%);
    z-index: 3;
    pointer-events: none;
}

.hero-container {
    max-width: var(--container-max);
    width: 100%;
    padding: var(--nav-height) 24px 40px;
    display: flex;
    align-items: center;
    gap: 48px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
}

.hero-greeting {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.hero-name {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 1rem;
    color: var(--gray-700);
    max-width: 540px;
    margin-bottom: 24px;
}

.hero-desc strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.hero-cta {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: var(--white) !important;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.hero-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Hero 右侧照片位 */
.hero-photo {
    position: relative;
    flex-shrink: 0;
    width: 360px;
    height: 460px;
}

/* 让照片本身在底部逐渐透明，露出 Hero 背景而非覆盖一层色块 */
.hero-photo > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0.72) 74%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0.72) 74%, transparent 100%);
}

.hero-photo-img {
    width: 100%;
    height: 100%;
    background-image: url('home pic.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* 底部渐变消失与背景融合 */
.hero-photo-fade {
    display: none;
}

/* --- 3.4 关于我 - 堆叠卡片（平滑过渡） --- */
.section-about {
    padding-top: 120px;
}

.stacked-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stacked-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stacked-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.stacked-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--purple-400), var(--purple-600));
}

.card-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.card-title span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-400);
    margin-left: 8px;
}

.card-content p {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.card-content strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* --- 3.5 教育经历 - 时间线 --- */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--purple-200);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item[data-side="left"] {
    left: 0;
    padding-right: 40px;
    text-align: right;
}

.timeline-item[data-side="right"] {
    left: 50%;
    padding-left: 40px;
}

.timeline-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.timeline-badge {
    position: absolute;
    top: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: var(--shadow);
}

.timeline-item[data-side="left"] .timeline-badge {
    right: -26px;
}

.timeline-item[data-side="right"] .timeline-badge {
    left: -26px;
}

.badge-icon {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.timeline-time {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.timeline-school {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white);
    background: var(--primary);
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
}

.timeline-major {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* --- 3.6 实习经历卡片 --- */
.internship-cards,
.program-cards,
.campus-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.internship-card,
.program-card,
.campus-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.internship-card.animate-in,
.program-card.animate-in,
.campus-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.internship-card:hover,
.program-card:hover,
.campus-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 该班级经历仅在中文页面展示。 */
html[lang="en"] .english-hidden {
    display: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.company-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 保留公司 Logo 原貌，不再使用紫色底框 */
.company-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-800);
}

.company-time {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.card-highlight {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.highlight-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-highlight span:last-child {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.card-role {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.card-duties {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-duties li {
    font-size: 0.88rem;
    color: var(--gray-600);
    padding-left: 18px;
    position: relative;
    line-height: 1.65;
}

.card-duties li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.85rem;
}

/* --- 3.7 实践项目 --- */
.program-card {
    border-left: 3px solid var(--primary);
}

.program-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.program-time {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.program-desc {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 12px;
    line-height: 1.7;
}

.program-desc strong {
    color: var(--primary-dark);
}

.program-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--white);
    background: var(--primary);
    padding: 2px 10px;
    border-radius: 12px;
}

/* 项目图片链接 - 右侧浮动 */
.program-image-link {
    display: block;
    float: right;
    width: 240px;
    margin: 0 0 12px 20px;
    text-decoration: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    flex-shrink: 0;
}

.program-image-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.program-image-container {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
    transition: var(--transition);
}

.program-image-container.memento-cover {
    background-image: url('memento cover.jpg');
}

.program-image-container.visafree-cover {
    background-image: url('visafree cover.jpg');
}

/* 渐变遮罩 + 标题文字 */
.program-image-overlay {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: var(--white);
    font-weight: 500;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.2) 60%,
        rgba(0, 0, 0, 0) 100%);
    transition: var(--transition);
}

.program-image-link:hover .program-image-overlay {
    background: linear-gradient(to top,
        rgba(124, 77, 255, 0.8) 0%,
        rgba(124, 77, 255, 0.3) 60%,
        rgba(124, 77, 255, 0) 100%);
    color: var(--white);
}

.program-image-hint {
    display: block;
    text-align: center;
    padding: 6px;
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 500;
}

/* 清除浮动 */
.program-card::after {
    content: '';
    display: block;
    clear: both;
}

/* 移动端取消浮动 */
@media (max-width: 768px) {
    .program-image-link {
        float: none;
        width: 100%;
        margin: 12px 0;
    }

    .program-image-container {
        height: 120px;
    }
}

/* --- 3.8 校园经历 --- */
.campus-role-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.4;
}

.campus-role-badge small {
    font-weight: 400;
    font-size: 0.7rem;
}

.campus-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.campus-time {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.campus-desc {
    font-size: 0.88rem;
    color: var(--gray-600);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.campus-duties {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.campus-duties li {
    font-size: 0.85rem;
    color: var(--gray-600);
    padding-left: 16px;
    position: relative;
    line-height: 1.65;
}

.campus-duties li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.8rem;
}

/* 奖项列表 */
.awards-block {
    margin-top: 48px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.awards-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
    text-align: center;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.award-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--purple-300);
    transition: var(--transition-fast);
}

.award-item:hover {
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.award-name {
    font-size: 0.85rem;
    color: var(--gray-600);
    flex: 1;
}

.award-time {
    font-size: 0.78rem;
    color: var(--gray-400);
    white-space: nowrap;
}

/* --- 3.9 技能与作品 --- */
.skills-group {
    margin-bottom: 64px;
}

.skills-subtitle {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
}

.skills-tags {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.skill-category {
    display: inline-block;
    min-width: 120px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    padding-top: 6px;
    flex-shrink: 0;
}

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

.skill-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--purple-200);
    border-radius: 16px;
    font-size: 0.82rem;
    color: var(--gray-600);
    transition: var(--transition-fast);
    cursor: default;
}

.skill-tag:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* 走马灯 / 画廊 */
.works-section {
    margin-bottom: 56px;
}

.works-subtitle {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.works-subtitle span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-400);
    margin-left: 8px;
}

.works-hint {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    padding: 12px 0;
}

.carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    flex: 0 0 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.carousel-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.carousel-img {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, var(--purple-200), var(--purple-400));
    flex-shrink: 0;
}

.carousel-img.video-img {
    background: linear-gradient(135deg, var(--gray-700), var(--purple-600));
}

.carousel-img.design-img {
    background: linear-gradient(135deg, var(--purple-300), var(--purple-500));
}

/* 视觉与平面设计：无边框、按原始比例展示的图片画廊 */
.design-gallery {
    border-radius: 0;
    padding: 30px 0;
}

.design-gallery-track {
    align-items: center;
    gap: 22px;
    padding: 12px 18px;
}

.design-gallery-item {
    flex: 0 0 auto;
    margin: 0;
    line-height: 0;
    position: relative;
    z-index: 0;
}

.design-gallery-item img {
    display: block;
    width: auto;
    height: 250px;
    max-width: min(68vw, 420px);
    object-fit: contain;
    transition: opacity 220ms ease, filter 220ms ease;
}

.design-gallery-item:hover img {
    opacity: 0.72;
    filter: brightness(0.9);
}

.design-preview {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(3px);
    transition: opacity 220ms ease, visibility 220ms ease;
}

.design-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    transform: scale(0.88);
    filter: drop-shadow(0 20px 32px rgba(53, 31, 92, 0.28));
    transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.design-gallery.is-previewing .design-preview {
    opacity: 1;
    visibility: visible;
}

.design-gallery.is-previewing .design-preview img {
    transform: scale(1);
}

.carousel-title {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.5;
    display: block;
}

.carousel-duration {
    padding: 0 14px 12px;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* 走马灯按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 5;
}

.carousel-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.carousel-prev {
    left: 4px;
}

.carousel-next {
    right: 4px;
}

/* --- 3.10 联系我 --- */
.section-contact {
    text-align: center;
}

.contact-hint {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 28px;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    min-width: 140px;
}

.contact-link:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--primary);
    color: var(--primary) !important;
}

.contact-icon {
    font-size: 1.8rem;
    color: var(--primary);
    line-height: 1;
}

.contact-label {
    font-size: 0.88rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* --- 3.11 页脚 --- */
.footer {
    text-align: center;
    padding: 32px 24px;
    background: var(--gray-100);
    color: var(--gray-400);
    font-size: 0.82rem;
}

/* ====== 4. 工具类 ====== */

/* 入场动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section 级别浮现动画 */
.section-header {
    text-align: center;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Skills/Works 子区域浮现 */
.skills-group,
.works-section,
.awards-block {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-group.animate-in,
.works-section.animate-in,
.awards-block.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 联系链接浮现 */
.contact-links {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-links.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ====== 5. 响应式 ====== */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .nav-mobile {
        display: flex;
    }

    .nav-container {
        justify-content: space-between;
    }

    .nav-logo img {
        width: 36px;
        height: 36px;
    }

    .language-option {
        min-width: 27px;
        padding: 5px 6px;
        font-size: 0.68rem;
    }

    .hero-container {
        text-align: center;
        gap: 24px;
        flex-direction: column;
    }

    .hero-photo {
        width: 280px;
        height: 360px;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .hero-desc {
        margin: 0 auto 24px;
    }

    .section {
        padding: 56px 16px;
    }

    .section-about {
        padding-top: 80px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    /* 时间线移动端改为单侧 */
    .timeline::before {
        left: 24px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-item[data-side="right"] {
        left: 0;
    }

    .timeline-item[data-side="left"] .timeline-badge,
    .timeline-item[data-side="right"] .timeline-badge {
        left: 0;
        right: auto;
    }

    /* 奖项单列 */
    .awards-grid {
        grid-template-columns: 1fr;
    }

    .award-item {
        flex-direction: column;
        gap: 4px;
    }

    /* 卡片内边距减小 */
    .stacked-card,
    .internship-card,
    .program-card,
    .campus-card {
        padding: 20px;
    }

    .awards-block {
        padding: 20px;
    }

    .skill-group {
        flex-direction: column;
        gap: 8px;
    }

    .skill-category {
        padding-top: 0;
    }

    /* 走马灯卡片窄 */
    .carousel-card {
        flex: 0 0 180px;
    }

    .design-gallery-item img {
        height: clamp(150px, 38vw, 210px);
        max-width: 72vw;
    }

    /* 进度条位置调整 */
    .progress-container {
        right: 10px;
        height: 120px;
    }

    .back-to-top {
        right: 14px;
        bottom: 16px;
        width: 40px;
        height: 40px;
    }

    /* 联系链接纵向排列 */
    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .carousel-card {
        flex: 0 0 150px;
    }

    .design-gallery-track {
        gap: 14px;
        padding-inline: 14px;
    }
}

/* ====== 6. 无障碍 ====== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* reduced-motion 下恢复默认光标 */
    body {
        cursor: auto !important;
    }
    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }

    .stacked-card,
    .timeline-item,
    .internship-card,
    .program-card,
    .campus-card,
    .section-header,
    .skills-group,
    .works-section,
    .awards-block,
    .contact-links {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* 焦点样式 */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* 跳转链接（屏幕阅读器） */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
