/* ====================
   全局重置 & 基础设置 — Apple Style
==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue: #0071e3;
    --blue-hover: #0077ed;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fafafa;
    --border: #d2d2d7;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, .hero-subtitle, .page-lead {
    text-wrap: balance;
}

p, li {
    text-wrap: pretty;
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====================
   导航栏 — 毛玻璃风格
==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.nav-logo {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2px;
}

.nav-toggle {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 400;
    transition: opacity 0.2s ease;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
}

/* ====================
   Hero 区域 — 苹果式纯色大字
==================== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fbfbfd;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 113, 227, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-primary);
}

.avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 28px;
    border-radius: 26px;
    box-shadow: 0 18px 40px rgba(0, 88, 208, 0.22);
    animation: gentle-float 4s ease-in-out infinite;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.hero-title .highlight {
    background: none;
    -webkit-text-fill-color: var(--blue);
    color: var(--blue);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}

.hero-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 16px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 980px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    border-radius: 980px;
    font-weight: 400;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
}

.btn:hover {
    background: var(--blue-hover);
    transform: scale(1.02);
}

/* ====================
   通用 Section 样式
==================== */
section {
    padding: 100px 48px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    position: relative;
}

.section-title::after {
    display: none;
}

/* ====================
   关于我
==================== */
.about {
    background: var(--bg-primary);
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    max-width: 1000px;
    margin: 40px auto 0;
}

.info-card {
    display: block;
    text-align: center;
    padding: 44px 28px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
    border: none;
    color: inherit;
    text-decoration: none;
}

.card-more {
    display: inline-block;
    margin-top: 16px;
    color: var(--blue);
    font-size: 0.88rem;
    font-weight: 500;
}

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

.card-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

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

/* ====================
   技能
==================== */
.skills {
    background: var(--bg-secondary);
}

.skills-container {
    max-width: 680px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.skill-info span:last-child {
    color: var(--text-tertiary);
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 980px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: var(--blue);
    border-radius: 980px;
    transition: width 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ====================
   联系方式
==================== */
.contact {
    background: var(--bg-primary);
    text-align: center;
}

.contact-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    margin-top: 8px;
}

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

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    width: 190px;
    justify-content: center;
    border: none;
    line-height: 1.6;
    font-family: inherit;
    cursor: pointer;
}

.contact-card small {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
    background: var(--blue);
    color: #fff;
}

.contact-card:hover small {
    color: rgba(255, 255, 255, 0.85);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.4rem;
    font-size: 1.8rem;
    line-height: 1;
}

.contact-icon svg {
    width: 2.1rem;
    height: 2.1rem;
    fill: #07c160;
    transition: fill 0.2s ease;
}

.contact-card:hover .contact-icon svg {
    fill: #fff;
}

/* ====================
   复制提示
==================== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    z-index: 2000;
    padding: 10px 20px;
    border-radius: 980px;
    background: rgba(29, 29, 31, 0.88);
    color: #fff;
    font-size: 0.88rem;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ====================
   底部
==================== */
.footer {
    text-align: center;
    padding: 36px 24px 28px;
    background: var(--bg-secondary);
    color: var(--text-tertiary);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

.footer p {
    margin-bottom: 6px;
}

.footer a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--blue);
}

/* ====================
   滚动指示器
==================== */
.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 7px;
}

.scroll-indicator span {
    width: 3px;
    height: 7px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    animation: scroll-dot 1.5s ease-in-out infinite;
}

@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(16px); opacity: 0; }
}

/* ====================
   响应式
==================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
        height: 44px;
    }

    .nav-links {
        gap: 0px;
    }

    .nav-links a {
        padding: 6px 7px;
        font-size: 0.78rem;
    }

    .nav-logo {
        font-size: 1rem;
        gap: 6px;
    }

    .nav-mark {
        width: 22px;
        height: 22px;
        border-radius: 6px;
    }

    section {
        padding: 80px 20px;
    }

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

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

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

    .contact-card {
        flex: 1 1 0;
        width: auto;
        max-width: 200px;
        padding: 24px 12px;
    }
}

/* ====================
   子页面（教育背景 / 工作经历 / 个人兴趣）
==================== */
.nav-links a.active {
    opacity: 1;
    font-weight: 600;
}

.page-hero {
    padding: 140px 48px 64px;
    background: #fbfbfd;
    text-align: center;
}

.page-icon {
    font-size: 3rem;
    margin-bottom: 18px;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.page-lead {
    max-width: 640px;
    margin: 16px auto 0;
    color: var(--text-secondary);
    font-size: 1.15rem;
}

.page-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 64px 24px 96px;
}

.page-section {
    padding: 0;
}

.page-section + .page-section {
    margin-top: 64px;
}

.page-section h2 {
    margin-bottom: 24px;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 6px;
    width: 2px;
    background: var(--border);
}

.tl-item {
    position: relative;
    padding: 28px 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.tl-item::before {
    content: '';
    position: absolute;
    top: 34px;
    left: -28px;
    width: 14px;
    height: 14px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 1px var(--border);
}

.tl-date {
    color: var(--blue);
    font-size: 0.85rem;
    font-weight: 600;
}

.tl-item h3 {
    margin-top: 4px;
    font-size: 1.25rem;
    font-weight: 600;
}

.tl-org {
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.tl-item ul {
    margin-top: 14px;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.tl-item li + li {
    margin-top: 6px;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tl-tags span {
    padding: 4px 12px;
    border-radius: 980px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.tl-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--blue);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.detail-card {
    padding: 28px 26px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.detail-card .card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.detail-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.detail-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.page-back {
    margin-top: 64px;
    text-align: center;
}

@media (max-width: 768px) {
    .page-hero {
        padding: 110px 20px 48px;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }

    .page-lead {
        font-size: 1rem;
    }

    .page-body {
        padding: 48px 20px 72px;
    }

    .tl-item {
        padding: 22px 20px;
    }
}

/* ====================
   手机端
==================== */
@media (max-width: 768px) {
    /* 导航：右上角菜单按钮 + 下拉菜单 */
    .navbar {
        height: 56px;
        padding: 0 20px;
    }

    .nav-logo {
        font-size: 1.1rem;
        gap: 8px;
    }

    .nav-mark {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 44px;
        height: 44px;
        margin-right: -10px;
        border: none;
        background: none;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: var(--text-primary);
        transition: transform 0.25s ease;
    }

    .navbar.is-open .nav-toggle span:first-child {
        transform: translateY(4px) rotate(45deg);
    }

    .navbar.is-open .nav-toggle span:last-child {
        transform: translateY(-4px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 4px 20px 12px;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    .navbar.is-open .nav-links {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-links li + li {
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-links a {
        display: block;
        padding: 15px 2px;
        border-radius: 0;
        font-size: 1.05rem;
        opacity: 1;
    }

    .nav-links a.active {
        color: var(--blue);
    }

    /* 首屏 */
    .hero {
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: 96px 24px 64px;
    }

    .avatar {
        width: 88px;
        height: 88px;
        margin-bottom: 28px;
        border-radius: 24px;
    }

    .hero-title {
        font-size: 2.6rem;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        font-size: 1.12rem;
        margin-bottom: 28px;
    }

    .hero-tags {
        gap: 8px;
        margin-bottom: 36px;
    }

    .btn {
        padding: 14px 34px;
    }

    .scroll-indicator {
        display: none;
    }

    /* 通用区块 */
    section {
        padding: 72px 20px;
    }

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

    /* 关于我：图标在左、文字在右 */
    .about-cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 28px;
    }

    .info-card {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        column-gap: 14px;
        align-items: center;
        padding: 20px;
        text-align: left;
    }

    .info-card .card-icon {
        grid-row: 1 / span 3;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        margin: 0;
        border-radius: 16px;
        background: #fff;
        font-size: 1.7rem;
        align-self: start;
    }

    .info-card h3 {
        margin-bottom: 4px;
        font-size: 1.1rem;
    }

    .info-card p {
        font-size: 0.9rem;
    }

    .card-more {
        margin-top: 8px;
        font-size: 0.86rem;
    }

    .skills-container {
        margin-top: 28px;
    }

    .contact-desc {
        margin-bottom: 28px;
        font-size: 1rem;
    }

    /* 子页面 */
    .page-hero {
        padding: 104px 22px 44px;
    }

    .page-icon {
        font-size: 2.6rem;
        margin-bottom: 12px;
    }

    .page-hero h1 {
        font-size: 2.15rem;
    }

    .page-lead {
        margin-top: 12px;
        font-size: 1rem;
    }

    .page-body {
        padding: 40px 18px 64px;
    }

    .page-section + .page-section {
        margin-top: 48px;
    }

    .page-section h2 {
        margin-bottom: 16px;
        font-size: 1.4rem;
    }

    .timeline {
        gap: 14px;
        padding-left: 22px;
    }

    .timeline::before {
        left: 5px;
    }

    .tl-item {
        padding: 20px 18px;
    }

    .tl-item::before {
        top: 26px;
        left: -22px;
        width: 12px;
        height: 12px;
    }

    .tl-item h3 {
        font-size: 1.12rem;
    }

    .tl-item ul {
        margin-top: 10px;
        padding-left: 18px;
        font-size: 0.92rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .detail-card {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 14px;
        padding: 18px;
    }

    .detail-card .card-icon {
        grid-row: 1 / span 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0;
        border-radius: 14px;
        background: #fff;
        font-size: 1.4rem;
    }

    .detail-card h3 {
        margin-bottom: 4px;
        font-size: 1.02rem;
    }

    .detail-card p {
        font-size: 0.88rem;
    }

    .page-back {
        margin-top: 44px;
    }
}
