/* ========================================
   凌羽 LINGYU — 个人展示网站
   Design System: Apple Dark Premium
   ======================================== */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --accent-gold: #d4a853;
    --accent-blue: #6366f1;

    /* Card gradients */
    --card-media: linear-gradient(135deg, #e44d26 0%, #f06529 50%, #d4a853 100%);
    --card-business: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
    --card-trading: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    --card-ai: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);

    /* Typography */
    --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-cn: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;

    /* Spacing */
    --section-padding: clamp(80px, 12vw, 160px);
    --container-max: 1200px;

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-cn);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
}

/* === Navigation === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(20px, 5vw, 48px);
    transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px clamp(20px, 5vw, 48px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-family: var(--font-en);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s var(--ease-out);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    font-family: var(--font-en);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--accent-gold);
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 0.2s forwards;
}

.hero-title {
    margin-bottom: 24px;
}

.hero-cn {
    display: block;
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 100;
    letter-spacing: 0.15em;
    line-height: 1.1;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 0.4s forwards;
}

.hero-en {
    display: block;
    font-family: var(--font-en);
    font-size: clamp(1rem, 3vw, 1.6rem);
    font-weight: 300;
    letter-spacing: 0.5em;
    color: var(--text-tertiary);
    margin-top: 8px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 0.6s forwards;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 0.8s forwards;
}

.hero-tagline {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 1s forwards;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 1.4s forwards;
}

.hero-scroll-hint svg {
    animation: bounce 2s ease infinite;
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--bg-secondary));
    z-index: 1;
}

/* Subtle ambient glow behind hero text */
.hero::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.06) 0%, transparent 70%);
    z-index: 0;
}

/* === Sections === */
.section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(48px, 8vw, 80px);
}

.section-label {
    font-family: var(--font-en);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    letter-spacing: 2px;
}

.section-desc {
    max-width: 560px;
    margin: 16px auto 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

/* === Projects Grid === */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    position: relative;
    border-radius: 24px;
    padding: 40px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-media { background: var(--card-media); }
.card-business { background: var(--card-business); }
.card-trading { background: var(--card-trading); }
.card-ai { background: var(--card-ai); }

.card-icon {
    position: absolute;
    top: 32px;
    right: 32px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-icon {
    opacity: 0.8;
}

.card-label {
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.card-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-tags span {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

/* === About Section === */
.about {
    background: var(--bg-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about-values {
    grid-column: 1 / -1;
}

.about-info-title {
    font-family: var(--font-en);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 28px;
}

/* Info list */
.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    letter-spacing: 1px;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent-gold);
}

.timeline-date {
    font-family: var(--font-en);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Values */
.values-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.value-item {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 28px;
    border-left: 3px solid var(--accent-gold);
    transition: transform 0.3s var(--ease-out);
}

.value-item:hover {
    transform: translateX(4px);
}

.value-item p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.value-item span {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* === Milestones === */
.milestones {
    background: var(--bg-secondary);
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.milestone-item {
    padding: 40px 20px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: transform 0.4s var(--ease-out), border-color 0.4s ease;
}

.milestone-item:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 83, 0.2);
}

.milestone-number {
    font-family: var(--font-en);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-gold), #f5e6c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.milestone-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.milestone-desc {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* === Contact === */
.contact {
    background: var(--bg-primary);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 40px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.4s var(--ease-out);
    min-width: 140px;
}

.contact-item:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 83, 0.2);
    background: var(--bg-tertiary);
}

.contact-icon {
    color: var(--accent-gold);
}

.contact-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.contact-handle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* === Footer === */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 1px;
}

/* === Animations === */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

/* Scroll animation: elements with [data-animate] */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for grid children */
.projects-grid [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.projects-grid [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.projects-grid [data-animate]:nth-child(4) { transition-delay: 0.3s; }

.milestones-grid [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.milestones-grid [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.milestones-grid [data-animate]:nth-child(4) { transition-delay: 0.3s; }

.contact-links [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.contact-links [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.contact-links [data-animate]:nth-child(4) { transition-delay: 0.3s; }

.about-grid [data-animate]:nth-child(2) { transition-delay: 0.15s; }
.about-grid [data-animate]:nth-child(3) { transition-delay: 0.3s; }

/* === Responsive === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 101;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 260px;
        padding: 28px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .values-list {
        grid-template-columns: 1fr;
    }

    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .milestone-item {
        padding: 28px 16px;
    }

    .contact-links {
        gap: 16px;
    }

    .contact-item {
        padding: 24px 28px;
        min-width: 120px;
    }

    .hero-scroll-hint {
        bottom: 24px;
    }
}

@media (max-width: 480px) {
    .milestones-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-cn {
        font-size: 3.2rem;
    }
}
