/* Reset and Base Styles */
:root {
    --bg-color: #0B0F19;
    --surface-color: rgba(26, 34, 53, 0.6);
    --surface-border: rgba(0, 240, 255, 0.2);
    --primary-accent: #00F0FF;
    --secondary-accent: #FF9E00;
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --grid-color: rgba(0, 240, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #0B0F19;
    border-bottom: 1px solid var(--surface-border);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-accent);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #FFFFFF; 
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--primary-accent);
    text-shadow: 0 0 8px var(--primary-accent);
}

/* Hero Section */
.hero {
    background: transparent;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
    position: relative;
    overflow: hidden;
}

/* --- HUD Decorative Elements --- */
.hud-element {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
    font-family: 'Courier New', Courier, monospace;
}

.hud-left {
    left: 5%;
    border-left: 2px solid var(--primary-accent);
    padding-left: 15px;
    text-align: left;
}

.hud-right {
    right: 5%;
    border-right: 2px solid var(--primary-accent);
    padding-right: 15px;
    text-align: right;
}

.hud-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.hud-text .highlight {
    color: var(--primary-accent);
    text-shadow: 0 0 5px var(--primary-accent);
    font-weight: bold;
}

.hud-line {
    width: 60px;
    height: 1px;
    background: var(--surface-border);
    margin: 10px 0;
}

.hud-right .hud-line {
    margin-left: auto;
}

.hud-data {
    font-size: 0.8rem;
    color: var(--secondary-accent);
}

.hud-data p {
    margin: 4px 0;
    text-shadow: 0 0 3px rgba(255, 158, 0, 0.4);
}

.hud-bar-container {
    display: flex;
    gap: 4px;
    margin: 10px 0;
    justify-content: flex-end;
    align-items: flex-end;
    height: 35px;
}

.hud-bar {
    width: 6px;
    background: rgba(0, 240, 255, 0.2);
}

.hud-bar:nth-child(1) { height: 100%; background: var(--primary-accent); box-shadow: 0 0 5px var(--primary-accent); }
.hud-bar:nth-child(2) { height: 80%; background: var(--primary-accent); box-shadow: 0 0 5px var(--primary-accent); }
.hud-bar:nth-child(3) { height: 60%; background: var(--primary-accent); }
.hud-bar:nth-child(4) { height: 40%; background: var(--primary-accent); }
.hud-bar:nth-child(5) { height: 20%; background: var(--surface-border); }

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    overflow: hidden;
    border: 3px solid var(--primary-accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-accent);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(226, 232, 240, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--primary-accent);
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    color: var(--primary-accent);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--primary-accent);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-main);
    position: relative;
    text-shadow: 0 0 5px rgba(226, 232, 240, 0.2);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-accent);
    margin: 1rem auto;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-accent);
}

/* About Section */
.about {
    padding: 5rem 0;
    background: transparent;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.bio p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.objectives {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.objectives h3 {
    color: var(--primary-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.objectives p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Skills Section */
.skills {
    padding: 5rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.15);
}

.skill-category h3 {
    color: var(--primary-accent);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary-accent);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--primary-accent);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Projects Section */
.projects {
    padding: 5rem 0;
    background: transparent;
}

.subsection-title {
    font-size: 2rem;
    text-align: center;
    margin: 4rem 0 2.5rem;
    color: var(--text-main);
    position: relative;
    text-shadow: 0 0 5px rgba(226, 232, 240, 0.2);
}

.subsection-title::before {
    content: '[ ';
    color: var(--primary-accent);
    opacity: 0.5;
}

.subsection-title::after {
    content: ' ]';
    color: var(--primary-accent);
    opacity: 0.5;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 限制为一排恰好两个卡片 */
    gap: 2rem;
}

/* Video Container for embedded YouTube */
.project-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--surface-border);
}

.project-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.project-card {
    background: var(--surface-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.15);
    border-color: var(--primary-accent);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--surface-border);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    filter: brightness(0.8) contrast(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--primary-accent);
    border-radius: 50%;
    color: var(--primary-accent);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(0, 240, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: var(--primary-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(255, 158, 0, 0.1);
    color: var(--secondary-accent);
    border: 1px solid rgba(255, 158, 0, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: rgba(11, 15, 25, 0.9);
    border-top: 1px solid var(--surface-border);
    color: var(--text-main);
    text-align: center;
}

.contact .section-title {
    color: var(--text-main);
}

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-accent);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid var(--surface-border);
}

.contact-link:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--primary-accent);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

/* Footer */
.footer {
    background: #06090f;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
/* hide huds on small screens so they don't overlap content */
    @media (max-width: 1024px) {
        .hud-element {
            display: none;
        }
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}
