:root {
    /* Color Palette - High-end Tech Blue & Dark Theme */
    --bg-color: #050a15; /* 深邃的暗空蓝 */
    --surface-color: rgba(10, 20, 40, 0.6); /* 稍微亮一点的表面颜色，带透明度 */
    --primary-color: #00e5ff; /* 赛博朋克高亮蓝/青色 */
    --primary-glow: 0 0 20px rgba(0, 229, 255, 0.6);
    --secondary-color: #3b82f6; /* 稳定的科技蓝 */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --nav-height: 80px;
    --section-padding: 100px 10%;
    
    /* Effects */
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-backdrop: blur(12px);
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 40%),
                radial-gradient(circle at 85% 30%, rgba(0, 229, 255, 0.1), transparent 40%);
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.highlight {
    color: var(--primary-color);
    text-shadow: var(--primary-glow);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: var(--primary-glow);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    outline: none;
}

.primary-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.5);
}

.secondary-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.secondary-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.2);
    transform: translateY(-3px);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10%;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border-bottom: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--text-main), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links li a {
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

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

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-smooth);
    box-shadow: var(--primary-glow);
}

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

.menu-btn {
    display: none;
    cursor: pointer;
}

.menu-btn .bar {
    width: 25px;
    height: 3px;
    background: var(--text-main);
    margin: 5px 0;
    transition: 0.3s;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    padding-top: var(--nav-height);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
}

.description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 400px;
}

.orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--secondary-color), transparent 70%);
    filter: blur(50px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
    top: 20%;
    right: 10%;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
    100% { transform: translateY(0px) scale(1); }
}

.glass-card {
    position: relative;
    z-index: 10;
    width: 280px;
    height: 320px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-lines {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.code-lines .line {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.highlight-line {
    width: 85%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color)) !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* --- Sections --- */
.section-padding {
    padding: var(--section-padding);
}

/* About Section */
.about-content {
    display: flex;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

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

.skill-tag {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.skill-tag:hover {
    background: rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--surface-color);
    border: var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

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

.project-img {
    height: 200px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    position: relative;
    overflow: hidden;
}

.project-img::after {
    content: '</>';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: monospace;
    font-size: 3rem;
    color: rgba(255,255,255,0.05);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.project-link:hover {
    text-shadow: var(--primary-glow);
    padding-left: 5px;
}

/* Resources Section */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.4);
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.3));
}

.resource-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.resource-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.download-btn {
    width: 80%;
    margin: 0;
}

/* Contact Section */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 60px 40px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.glass-panel h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.glass-panel > p {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .title { font-size: 3rem; }
    .hero { flex-direction: column; text-align: center; justify-content: center; gap: 50px; }
    .hero-content { align-items: center; display: flex; flex-direction: column; }
    .secondary-btn { margin-left: 0; margin-top: 15px; display: block; }
}

@media (max-width: 768px) {
    .menu-btn { display: block; z-index: 1001; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s;
        border-left: var(--glass-border);
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 20px 0; }
    .nav-links li a { font-size: 1.2rem; }
    
    :root { --section-padding: 80px 5%; }
    .title { font-size: 2.5rem; }
    .glass-card { display: none; } /* Hide 3D element on small mobile */
}
