/* 全局CSS变量定义 */
:root {
    --bg-color: #030303; 
    --surface-color: #0d0d0d;
    --surface-light: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --accent-color: #00ffb3; /* Mint/Neon Green */
    --accent-gradient: linear-gradient(135deg, #00ffb3 0%, #0088ff 100%);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* 胶片噪点颗粒 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.04;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 255, 179, 0.4);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.scrolled {
    background: rgba(3, 3, 3, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.2rem 5%;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin-left: auto;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    transition: color 0.3s;
}

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

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

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

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

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 0 5%;
    display: flex;
    justify-content: center;
    text-align: center;
}

.hero-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.greeting {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--accent-color);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.glass-title {
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.glass-text-reveal {
    background: linear-gradient(270deg, #ffffff, #555555, var(--accent-color), #ffffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: flowGradient 15s ease infinite;
}

@keyframes flowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero .subtitle {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 6px;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.cta-button {
    padding: 1.2rem 3rem;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: none;
}

.cta-button.primary {
    background: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
}

.cta-button.primary:hover {
    background: transparent;
    color: var(--text-primary);
}

.cta-button.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.cta-button.secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator p {
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 700;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 2px;
    animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Sections */
.section {
    padding: 10rem 0;
    position: relative;
}

.section-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    margin-bottom: 5rem;
    position: relative;
    text-transform: uppercase;
}

.section-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-primary);
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section-title.in-view::before {
    width: 100%;
}

.section-cn {
    font-size: 1.2rem;
    color: #666666;
    font-weight: 400;
    -webkit-text-stroke: 0;
    margin-left: 1.5rem;
    letter-spacing: 2px;
    vertical-align: middle;
    text-transform: none;
    font-family: var(--font-body);
}

/* Experience Section */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
}

.exp-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background: var(--border-color);
}

.exp-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 2rem;
    position: relative;
    padding-left: 2.5rem;
}

.exp-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 4px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.exp-item::after {
    content: '';
    position: absolute;
    left: -4px;
    top: 10px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0;
    transform: scale(0);
    transform-origin: center;
    transition: all 0.3s ease;
}

.exp-item:hover::before {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.exp-item:hover::after {
    opacity: 1;
    transform: scale(1);
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.exp-year {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    padding-top: 5px;
}

.exp-duration {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: #777777;
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

.exp-details {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    padding: 1.5rem 3rem 3rem 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.4s ease, border-color 0.4s ease;
    cursor: none;
}

.exp-item:hover .exp-details {
    transform: translateX(10px);
    border-color: rgba(0, 255, 179, 0.3);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.exp-title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    flex: 1 1 auto;
    min-width: 0;
}

.exp-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.exp-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-color);
    background: rgba(0, 255, 179, 0.06);
    border: 1px solid rgba(0, 255, 179, 0.25);
    border-radius: 100px;
    padding: 0.3rem 0.85rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.exp-tag:hover {
    background: rgba(0, 255, 179, 0.15);
    border-color: rgba(0, 255, 179, 0.6);
}

.exp-details h3 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--text-primary);
}

.exp-details h4 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.exp-company-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    text-align: right;
    flex: 0 1 auto;
    max-width: 52%;
}

.company-desc {
    font-size: 0.85rem;
    color: #888888;
    line-height: 1.6;
    max-width: 100%;
    text-align: left;
    margin: 0;
}

.exp-details p {
    font-size: 1rem;
    line-height: 1.7;
    color: #bbb;
}

.exp-subtitle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.exp-subtitle svg {
    flex-shrink: 0;
    stroke: var(--accent-color);
    width: 20px;
    height: 20px;
}

.exp-details ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.exp-details ul li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #bbb;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.exp-details ul li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(2.5rem + 10px);
}

.project-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: none;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 179, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.project-img-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 50%, var(--surface-color) 100%);
    pointer-events: none;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%) contrast(1.1);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1);
}

.project-info {
    padding: 2rem;
}

.project-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Card */
.contact-card {
    background: linear-gradient(145deg, rgba(20,20,20,0.6) 0%, rgba(5,5,5,0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4rem;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, transform 0.4s ease;
}

.contact-card:hover {
    border-color: rgba(0, 255, 179, 0.2);
    transform: translateY(-5px);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 179, 0.05), transparent 60%);
    pointer-events: none;
    transition: transform 0.6s ease;
}

.contact-card:hover::before {
    transform: translate(5%, 5%);
}

.contact-info {
    flex: 1.2;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 255, 179, 0.1);
}

.profile-title h3 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.3rem;
}

.profile-title p {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.profile-bio {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.8;
}

.contact-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-weight: 700;
}

.contact-item .value {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.highlight-link {
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    width: fit-content;
    transition: color 0.3s;
}

.highlight-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-secondary);
    transition: all 0.3s ease;
}

.highlight-link:hover {
    color: var(--accent-color);
}

.highlight-link:hover::after {
    background: var(--accent-color);
    width: 100%;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-icon-btn {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.8rem 1.5rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    transition: all 0.3s ease;
    cursor: none;
}

.social-icon-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 5%;
    background: var(--bg-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.footer-logo span {
    color: var(--accent-color);
}

footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .exp-item { grid-template-columns: 1fr; gap: 1rem; }
    .exp-item::before { left: -3px; }
    .contact-card { flex-direction: column; padding: 3rem; gap: 3rem; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* 移动端导航：默认收起为右侧全屏抽屉，点击汉堡展开 */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(320px, 80%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        margin-left: 0;
        background: rgba(10, 12, 16, 0.97);
        backdrop-filter: blur(12px);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s ease, visibility 0.35s ease;
        z-index: 1000;
    }
    .nav-links.open {
        transform: translateX(0);
        visibility: visible;
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001;
    }
    .hamburger .line {
        width: 30px;
        height: 2px;
        background: white;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .hamburger.active .line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active .line:nth-child(2) { opacity: 0; }
    .hamburger.active .line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .glass-title { font-size: 3rem; }
    .section-title { font-size: 2.5rem; }
    .section { padding: 6rem 0; }

    .cursor, .cursor-follower { display: none; }
    body, a, .social-icon-btn, .cta-button { cursor: auto; }

    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }

    /* Experience cards: stack header, keep tags readable */
    .exp-item {
        grid-template-columns: 60px 1fr;
        gap: 1.2rem;
        padding-left: 1.5rem;
    }
    .exp-item::before {
        left: -8px;
        top: 4px;
        width: 17px;
        height: 17px;
    }
    .exp-item::after {
        left: -3px;
        top: 10px;
        width: 7px;
        height: 7px;
    }
    .exp-header {
        flex-direction: column;
        gap: 1rem;
    }
    .exp-title-block {
        width: 100%;
    }
    .exp-tags {
        flex-wrap: wrap;
    }
    .exp-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
    .exp-company-block {
        align-items: flex-start;
        text-align: left;
        max-width: 100%;
    }
    .company-desc {
        text-align: left;
        max-width: 100%;
    }
}

/* Glass blobs */
.glass-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    mix-blend-mode: screen;
}

.blob-1 { width: 300px; height: 300px; background: rgba(0, 255, 179, 0.3); top: 30%; left: 30%; animation: float 10s infinite alternate ease-in-out; }
.blob-2 { width: 400px; height: 400px; background: rgba(0, 136, 255, 0.2); top: 60%; left: 60%; animation: float 12s infinite alternate-reverse ease-in-out; }

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