:root {
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition-smooth);
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-white);
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-white);
    font-weight: 500;
    transition: var(--transition-smooth);
    opacity: 0.8;
}

.nav-links a:hover {
    color: var(--primary-color);
    opacity: 1;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 40%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    margin-left: 1rem;
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-image .image-wrapper {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-image img {
    width: 100%;
    display: block;
    transition: transform 0.8s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* Section Common */
section {
    padding: 100px 0;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.skill-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 1);
    border-color: var(--primary-color);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    margin-bottom: 1rem;
}

.project-info p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.project-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

/* Contact */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.delay-1 {
    transition-delay: 0.2s !important;
}

.delay-2 {
    transition-delay: 0.4s !important;
}

.delay-3 {
    transition-delay: 0.6s !important;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    /* Mobile Menu styles */
    .menu-btn {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-btn .bar {
        width: 30px;
        height: 3px;
        background: white;
        transition: 0.3s;
    }

    .menu-btn.open .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-btn.open .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-btn.open .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-dark);
        padding: 100px 2rem;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }
}