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

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.logo:hover::before {
    left: 100%;
}

.logo:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 15px rgba(102, 126, 234, 0.4));
}

.logo-icon {
    width: 40px;
    height: 40px;
    animation: logoPulse 2s ease-in-out infinite, logoGlow 3s ease-in-out infinite, logoRotate 8s linear infinite;
    filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.5)) drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.5)) drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 25px rgba(102, 126, 234, 0.8)) drop-shadow(0 0 50px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 70px rgba(255, 0, 255, 0.3));
    }
}

@keyframes logoGlow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

@keyframes logoRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    justify-self: end;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.08);
}

.nav-menu a.active {
    color: white;
    background: var(--gradient);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: white;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 0.8s ease;
}

.hero-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 32px;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: avatarFloat 3s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.highlight {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 22px;
    margin-bottom: 32px;
    opacity: 0.9;
    font-weight: 400;
}

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

.hero-tag {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-4px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.section {
    padding: 120px 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--light);
}

.section-title {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 64px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text {
    padding: 20px 0;
}

.about-text p {
    font-size: 17px;
    line-height: 2;
    color: #555;
    margin-bottom: 32px;
}

.about-social {
    display: flex;
    gap: 12px;
}

.social-link {
    padding: 12px 28px;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.about-info {
    background: white;
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-item {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
}

.work-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.work-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.work-image {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.work-image.placeholder {
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(102, 126, 234, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-info {
    padding: 32px;
}

.work-category {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.work-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.work-desc {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
}

.work-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.work-link:hover {
    gap: 12px;
}

.skill-category {
    margin-bottom: 56px;
}

.skill-category:last-child {
    margin-bottom: 0;
}

.skill-category-title {
    font-size: 24px;
    margin-bottom: 32px;
    color: var(--dark);
    text-align: center;
    font-weight: 600;
}

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

.skill-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

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

.skill-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.skill-percent {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.skill-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info {
    padding: 20px 0;
}

.contact-info h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 700;
}

.contact-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.8;
}

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

.contact-link {
    padding: 12px 28px;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.contact-form {
    background: white;
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.alert {
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: #999;
    font-size: 18px;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 48px 24px;
}

.footer p {
    opacity: 0.7;
    margin-bottom: 12px;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

@media (max-width: 768px) {
    .nav-container {
        grid-template-columns: auto 1fr;
    }

    .mobile-menu-toggle {
        display: flex;
        justify-self: end;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu a {
        padding: 14px 18px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-avatar {
        width: 120px;
        height: 120px;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

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

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

    .section-title {
        font-size: 32px;
    }
}
