/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 40, 80, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 255, 255, 0.05) 0%, transparent 20%);
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    font-weight: 300;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.highlight {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Header & Navigation */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    margin-bottom: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
    color: #00ffff;
    font-weight: 700;
}

.logo-text {
    font-size: 1.8rem;
    background: linear-gradient(90deg, #00ffff, #00ffaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'JetBrains Mono', 'Microsoft YaHei', monospace;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    position: relative;
    padding: 8px 12px;
    font-weight: 500;
    color: #aaa;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: #00ffff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ffff;
    transition: width 0.3s ease;
}

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

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(10, 10, 15, 0.95);
    min-width: 180px;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    z-index: 1000;
    overflow: hidden;
    text-align: center;
}

.dropdown-content a {
    color: #e0e0e0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 400;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    padding-left: 20px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .nav-link {
    color: #00ffff;
}

.dropdown:hover .nav-link::after {
    width: 100%;
}

/* 移动端下拉菜单显示 */
.dropdown-content.show {
    display: block;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 100px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #aaa;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 30px;
    color: #ccc;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(90deg, #00ffff, #00ccff);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.3);
}

.btn-outline {
    border-color: #00ffff;
    color: #00ffff;
}

.btn-outline:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-3px);
}

.hero-avatar {
    flex: 0 0 auto;
}

.avatar-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #001122, #003344);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: #00ffff;
    position: relative;
    z-index: 2;
    border: 4px solid transparent;
    background-clip: padding-box;
}

.avatar-img::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #00ffff, #00ffaa);
    border-radius: 50%;
    z-index: -1;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Section Common */
.section {
    margin-bottom: 120px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title-num {
    color: #00ffff;
    font-family: 'JetBrains Mono', 'Microsoft YaHei', monospace;
    font-size: 1.5rem;
    opacity: 0.7;
}

/* About Section */
.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(0, 40, 80, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    min-width: 120px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ffff;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 5px;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.code-window {
    background: #001122;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.window-header {
    background: #002244;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27ca3f; }

.window-title {
    margin-left: 10px;
    font-family: 'JetBrains Mono', 'Microsoft YaHei', monospace;
    font-size: 0.9rem;
    color: #aaa;
}

.window-content {
    padding: 30px;
}

.window-content pre {
    margin: 0;
    overflow-x: auto;
}

.window-content code {
    font-family: 'JetBrains Mono', 'Microsoft YaHei', monospace;
    font-size: 1rem;
    color: #00ffaa;
    line-height: 1.5;
}

.language-javascript .keyword { color: #ff79c6; }
.language-javascript .string { color: #f1fa8c; }
.language-javascript .number { color: #bd93f9; }

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: rgba(0, 20, 40, 0.5);
    border-radius: 10px;
    padding: 30px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
    border-color: #00ffff;
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: #00ffff;
    font-size: 1.3rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-name {
    font-weight: 400;
}

.skill-level {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.skill-level.expert {
    background: rgba(0, 255, 170, 0.2);
    color: #00ffaa;
}

.skill-level.advanced {
    background: rgba(0, 200, 255, 0.2);
    color: #00c8ff;
}

.skill-level.intermediate {
    background: rgba(100, 150, 255, 0.2);
    color: #6496ff;
}

/* Contact Section */
.contact-content {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #00ffff;
}

.contact-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 500px;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 30, 60, 0.3);
    border-radius: 8px;
    border-left: 3px solid #00ffff;
}

.contact-item i {
    font-size: 1.5rem;
    color: #00ffff;
    width: 30px;
    text-align: center;
}

.contact-label {
    display: block;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 5px;
}

.contact-value {
    font-weight: 500;
    color: #fff;
}

.contact-value:hover {
    color: #00ffff;
}

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

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 40, 80, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.social-link:hover {
    background: #00ffff;
    color: #000;
    transform: translateY(-5px);
}

/* QR Code Section */
.qr-section {
    flex: 1;
    min-width: 300px;
}

.qr-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #00ffaa;
}

.qr-desc {
    margin-bottom: 30px;
    color: #aaa;
}

.qr-container {
    background: rgba(0, 20, 40, 0.5);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.qr-placeholder {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.qr-code {
    width: 250px;
    height: 250px;
    background: #001122;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px dashed rgba(0, 255, 255, 0.3);
}

.qr-pattern {
    width: 80%;
    height: 80%;
    background:
        linear-gradient(90deg, transparent 49%, #00ffff 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, #00ffff 50%, transparent 51%),
        radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.2) 0%, transparent 20%),
        radial-gradient(circle at 70% 70%, rgba(0, 255, 170, 0.2) 0%, transparent 20%);
    background-size: 20px 20px, 20px 20px, 100% 100%, 100% 100%;
    opacity: 0.5;
}

.qr-instruction {
    position: absolute;
    text-align: center;
    color: #aaa;
}

.qr-instruction i {
    font-size: 3rem;
    color: #00ffff;
    margin-bottom: 15px;
    display: block;
}

.qr-instruction p {
    font-weight: 500;
    margin-bottom: 5px;
}

.qr-instruction small {
    font-size: 0.8rem;
    color: #888;
}

.qr-notes {
    background: rgba(0, 40, 80, 0.3);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid #00ffaa;
    font-size: 0.9rem;
    color: #ccc;
}

.qr-notes code {
    font-family: 'JetBrains Mono', 'Microsoft YaHei', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: #00ffaa;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    margin-top: 60px;
    color: #888;
    font-size: 0.9rem;
}

.footer-text {
    margin-bottom: 10px;
}

.footer-text i {
    color: #ff5f7c;
    margin: 0 5px;
}

.footer-note {
    font-size: 0.8rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        flex-direction: column;
    }

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

    .nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

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

    .avatar-container {
        width: 250px;
        height: 250px;
    }

    .avatar-glow {
        width: 300px;
        height: 300px;
    }

    /* 移动端下拉菜单调整 */
    .dropdown {
        position: relative;
    }

    .dropdown-content {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 100%;
        width: 200px;
        text-align: center;
    }

    .dropdown:hover .dropdown-content {
        display: none;
    }

    .dropdown-content.show {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

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

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .about-stats {
        justify-content: center;
    }

    .stat {
        min-width: 100px;
    }
}