:root {
    /* Color Palette */
    --bg-main: #0a0a0f;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-1: #00f0ff;
    --accent-2: #7a22ff;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Background Effects */
.bg-gradient-1, .bg-gradient-2 {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.bg-gradient-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.bg-gradient-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Language Toggle */
body.lang-zh .lang-en { display: none !important; }
body.lang-en .lang-zh { display: none !important; }

.btn-lang {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-lang:hover {
    background: var(--glass-bg);
    border-color: var(--accent-1);
    color: var(--accent-1);
}

/* Avatar Placeholder */
.avatar-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 5rem;
    color: #fff;
    box-shadow: 0 0 40px rgba(122, 34, 255, 0.5);
    position: relative;
    padding: 4px;
}

.avatar-placeholder::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--bg-main);
    border-radius: 50%;
    z-index: 1;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    position: relative;
}


/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #fff;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Navbar */
#navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

#hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

#hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    box-shadow: 0 4px 15px rgba(122, 34, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 34, 255, 0.5);
}

.btn-disabled {
    background: var(--glass-bg);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    cursor: not-allowed;
}

/* Projects Section */
#projects {
    padding: 8rem 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-align: center;
}

.section-title.left-align {
    text-align: left;
}

.projects-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.project-card {
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-info {
    width: 100%;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-1);
    font-weight: 500;
}

.project-info h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--accent-2);
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.highlights {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.highlights h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.highlights ul {
    list-style-position: inside;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlights li strong {
    color: var(--text-main);
}

/* --- Hobbies Section & Slider --- */
#hobbies {
    padding: 8rem 0;
}

.hobbies-header {
    margin-bottom: 3rem;
    max-width: 800px;
}

.hobby-subtitle {
    font-size: 2rem;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hobby-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

.hobbies-sliders {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}

.slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.slide-placeholder {
    font-size: 5rem;
    color: var(--text-muted);
    opacity: 0.3;
    z-index: 1;
}

.slider-btn {
    position: absolute;
    top: calc(50% - 1.5rem);
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: var(--bg-main);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-location {
    text-align: center;
    padding: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-top: 1px solid var(--glass-border);
}

.slider-location i {
    color: var(--accent-1);
    margin-right: 0.5rem;
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content h2 {
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--accent-2);
    transform: translateY(-3px);
}

footer p {
    color: var(--text-muted);
}

/* Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    padding: 3rem 4rem;
    border-radius: 24px;
    position: relative;
    max-width: 500px;
    width: 90%;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.5, 0, 0, 1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.5) 100%);
    backdrop-filter: blur(20px);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-1);
}

.modal-body h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.modal-body p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-body p i {
    color: var(--accent-1);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    #hero h1 {
        font-size: 4rem;
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-info {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    #hero h1 {
        font-size: 3rem;
    }
    
    .nav-links {
        display: none; /* simple mobile menu hidden for now */
    }
}
