/* ============================================
   吞兮兮个人主页 - 样式表
   ============================================ */

/* ===== 全局变量 ===== */
:root {
    --deep: #0e2a32;
    --teal: #14555e;
    --sea: #1d7a84;
    --mint: #7fd8c9;
    --coral: #ff7e5f;
    --amber: #ffb347;
    --cream: #fdf6ec;
    --ink: #1a2e35;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    /* 深海底色 + 海绿微光 + 铜钱暖金，呼应"吞"之海洋与六爻铜钱 */
    background:
        radial-gradient(ellipse at 18% -10%, rgba(29, 122, 132, 0.28), transparent 55%),
        radial-gradient(ellipse at 85% 108%, rgba(255, 179, 71, 0.07), transparent 50%),
        var(--deep);
    color: var(--cream);
    overflow-x: hidden;
}

::selection {
    background: var(--coral);
    color: var(--deep);
}

/* ===== 动态背景粒子 ===== */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== 导航栏 ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 18px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.4s, box-shadow 0.4s;
}

nav.scrolled {
    background: rgba(14, 42, 50, 0.92);
    box-shadow: 0 2px 24px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
}

.nav-logo {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 1.6rem;
    color: var(--amber);
    text-decoration: none;
    letter-spacing: 2px;
}

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

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--coral);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--amber);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== 首屏 ===== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 120px 8vw 80px;
    gap: 40px;
}

.hero-text .greeting {
    font-size: 1.1rem;
    color: var(--mint);
    letter-spacing: 4px;
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeUp 0.8s 0.3s forwards;
}

.hero-text h1 {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: clamp(3.2rem, 8vw, 6.5rem);
    line-height: 1.15;
    color: var(--cream);
    opacity: 0;
    animation: fadeUp 0.8s 0.5s forwards;
}

.hero-text h1 .highlight {
    color: var(--coral);
    position: relative;
    display: inline-block;
}

.hero-text h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(255, 179, 71, 0.3);
    border-radius: 6px;
    z-index: -1;
}

.hero-text .tagline {
    margin-top: 24px;
    font-size: 1.15rem;
    font-weight: 300;
    color: rgba(253, 246, 236, 0.75);
    line-height: 1.9;
    max-width: 480px;
    opacity: 0;
    animation: fadeUp 0.8s 0.7s forwards;
}

.hero-cta {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    opacity: 0;
    animation: fadeUp 0.8s 0.9s forwards;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* ===== 按钮 ===== */
.btn {
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--coral), var(--amber));
    color: var(--deep);
    box-shadow: 0 8px 30px rgba(255, 126, 95, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 14px 40px rgba(255, 126, 95, 0.5);
}

.btn-ghost {
    border: 1.5px solid var(--mint);
    color: var(--mint);
}

.btn-ghost:hover {
    background: rgba(127, 216, 201, 0.1);
    box-shadow: 0 8px 24px rgba(127, 216, 201, 0.15);
}

.btn-mypi {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 11px 22px 11px 14px;
    border-radius: 999px;
    border: 1px solid rgba(127, 216, 201, 0.35);
    background:
        linear-gradient(135deg, rgba(29, 122, 132, 0.42), rgba(20, 85, 94, 0.55)),
        rgba(14, 42, 50, 0.35);
    color: var(--cream);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 28px rgba(14, 42, 50, 0.35);
    backdrop-filter: blur(6px);
}

.btn-mypi:hover {
    border-color: rgba(127, 216, 201, 0.7);
    background:
        linear-gradient(135deg, rgba(29, 122, 132, 0.62), rgba(20, 85, 94, 0.72)),
        rgba(14, 42, 50, 0.4);
    box-shadow: 0 12px 32px rgba(29, 122, 132, 0.35);
    color: #fff;
}

.btn-mypi-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: rgba(127, 216, 201, 0.18);
    color: var(--mint);
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1;
}

.btn-mypi-arrow {
    color: var(--mint);
    opacity: 0.85;
    font-size: 0.9em;
}

/* ===== 首屏右侧头像区 ===== */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeUp 1s 0.6s forwards;
}

.avatar-wrap {
    position: relative;
    width: 320px;
    height: 320px;
}

.avatar-ring {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 2px dashed var(--sea);
    animation: spin 24s linear infinite;
}

/* 环绕头像的象数与工科符号 */
.avatar-ring::before {
    content: '☯️';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
}

.avatar-ring::after {
    content: '⚙️';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--teal), var(--sea));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 -8px 30px rgba(0,0,0,0.2);
    animation: float 5s ease-in-out infinite;
    user-select: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.avatar-icon {
    width: 58%;
    height: 58%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s, opacity 0.2s;
}

.avatar:hover {
    transform: scale(1.05) rotate(-3deg);
}

.avatar:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 6px;
}

.orbit-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 12px var(--amber);
    animation: orbit 8s linear infinite;
}

.orbit-dot:nth-child(3) {
    background: var(--coral);
    box-shadow: 0 0 12px var(--coral);
    animation-duration: 12s;
    animation-direction: reverse;
    width: 10px;
    height: 10px;
}

/* ===== 滚动提示 ===== */
.scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(253,246,236,0.5);
    font-size: 0.8rem;
    letter-spacing: 2px;
    animation: bounce 2s infinite;
}

.scroll-hint .arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--mint);
    border-bottom: 2px solid var(--mint);
    transform: rotate(45deg);
}

/* ===== 通用 Section ===== */
section {
    position: relative;
    z-index: 1;
    padding: 100px 8vw;
}

.section-title {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
    color: var(--cream);
}

.section-title .dot {
    color: var(--coral);
}

.section-sub {
    color: rgba(253,246,236,0.6);
    font-weight: 300;
    margin-bottom: 56px;
    font-size: 1.05rem;
}

/* ===== 关于我 ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}

.about-card {
    background: linear-gradient(160deg, rgba(29,122,132,0.25), rgba(20,85,94,0.15));
    border: 1px solid rgba(127,216,201,0.15);
    border-radius: 20px;
    padding: 40px;
    transition: transform 0.4s, box-shadow 0.4s;
}

.about-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.about-card .emoji-big {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--amber);
}

.about-card p {
    color: rgba(253,246,236,0.7);
    line-height: 1.9;
    font-weight: 300;
}

.about-text {
    font-size: 1.05rem;
    line-height: 2.2;
    color: rgba(253,246,236,0.8);
    font-weight: 300;
}

.about-text strong {
    color: var(--mint);
    font-weight: 500;
}

.stats-row {
    display: flex;
    gap: 48px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 2.6rem;
    color: var(--coral);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(253,246,236,0.55);
    margin-top: 4px;
}

/* ===== 技能 ===== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.skill-bar-item {
    background: rgba(29,122,132,0.12);
    border: 1px solid rgba(127,216,201,0.1);
    border-radius: 16px;
    padding: 28px 32px;
    transition: transform 0.3s, border-color 0.3s;
}

.skill-bar-item:hover {
    transform: translateY(-4px);
    border-color: rgba(127,216,201,0.35);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.skill-name {
    font-size: 1rem;
    font-weight: 500;
}

.skill-percent {
    font-family: 'ZCOOL KuaiLe', cursive;
    color: var(--amber);
    font-size: 1.1rem;
}

.skill-track {
    height: 8px;
    background: rgba(253,246,236,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--sea), var(--mint));
    width: 0;
    transition: width 1.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.skill-fill.warm {
    background: linear-gradient(90deg, var(--coral), var(--amber));
}

/* ===== 兴趣爱好 ===== */
.hobby-marquee {
    overflow: hidden;
    margin-bottom: 48px;
    padding: 20px 0;
    border-top: 1px solid rgba(127,216,201,0.12);
    border-bottom: 1px solid rgba(127,216,201,0.12);
}

.marquee-inner {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: marquee 20s linear infinite;
}

.marquee-inner span {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 1.5rem;
    color: rgba(253,246,236,0.35);
    white-space: nowrap;
}

.hobby-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.hobby-card {
    background: rgba(20, 85, 94, 0.2);
    border: 1px solid rgba(127,216,201,0.1);
    border-radius: 18px;
    padding: 36px 28px;
    text-align: center;
    transition: transform 0.35s, background 0.35s, box-shadow 0.35s;
    cursor: default;
}

.hobby-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(29, 122, 132, 0.3);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.hobby-card .icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 16px;
    transition: transform 0.35s;
}

.hobby-card:hover .icon {
    transform: scale(1.25) rotate(-8deg);
}

.hobby-card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--cream);
}

.hobby-card p {
    font-size: 0.85rem;
    color: rgba(253,246,236,0.55);
    line-height: 1.7;
}

/* ===== 时间线 ===== */
.timeline {
    position: relative;
    padding-left: 40px;
    max-width: 700px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--coral), var(--sea), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s, transform 0.6s;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 12px rgba(255,126,95,0.5);
}

.timeline-item .year {
    font-family: 'ZCOOL KuaiLe', cursive;
    color: var(--amber);
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.timeline-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.timeline-item p {
    color: rgba(253,246,236,0.6);
    font-weight: 300;
    line-height: 1.8;
}

/* ===== 联系 ===== */
.contact-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
}

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

.contact-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    border: 1.5px solid rgba(127,216,201,0.3);
    color: var(--cream);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.contact-chip:hover {
    border-color: var(--coral);
    background: rgba(255,126,95,0.08);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.contact-chip .chip-icon {
    font-size: 1.3rem;
}

/* ===== 页脚 ===== */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 48px 8vw;
    border-top: 1px solid rgba(127,216,201,0.1);
    color: rgba(253,246,236,0.4);
    font-size: 0.85rem;
}

footer .heart {
    color: var(--coral);
    display: inline-block;
    animation: heartbeat 1.5s infinite;
}

/* ===== 波浪分隔 ===== */
.wave-divider {
    position: relative;
    z-index: 1;
    height: 80px;
    overflow: hidden;
}

.wave-divider svg {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 100%;
    animation: waveDrift 12s linear infinite;
}

/* ===== 动画关键帧 ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(185px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(185px) rotate(-360deg); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

@keyframes waveDrift {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ===== 滚动显现 ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 140px;
    }

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

    .hero-cta {
        align-items: center;
    }

    .cta-row {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .avatar-wrap {
        width: 220px;
        height: 220px;
    }

    .avatar-icon { width: 62%; height: 62%; }

    .orbit-dot { animation-name: orbitSmall; }

    @keyframes orbitSmall {
        from { transform: rotate(0deg) translateX(130px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(130px) rotate(-360deg); }
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .nav-links { display: none; }
}
