:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #333333;
    --bg-color: #ffffff;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header Styles */
header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    z-index: 100;
    top: 0;
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 101;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

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

.nav-links a {
    font-weight: 500;
}

/* Hero Section */
.hero {
    padding: 100px 0 60px;
    background-color: var(--bg-color);
    text-align: center;
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.25rem;
    max-width: 820px;
    margin: 0 auto 20px;
    color: #4b5563;
}

.hero .about-text {
    margin-top: 30px;
    margin-bottom: 25px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.hero .about-text p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #374151;
    text-align: left;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.social-links a {
    font-size: 1.25rem;
    color: #4b5563;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Section Styles */
section {
    padding: 60px 0 40px;
    scroll-margin-top: 80px;
}

section:nth-child(even) {
    background-color: var(--bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.name-pronunciation {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-weight: bold;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: #4b5563;
}

/* Skills Section */
#skills {
    padding: 100px 0 40px;
}

.skills-container {
    margin-top: 20px;
}

.skill-category {
    margin-bottom: 20px;
}

.skill-category h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #4b5563;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Experience Section */
.experience-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-item {
    margin-bottom: 0;
}

.experience-content {
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.experience-content h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.experience-content .company-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-style: italic;
}

.experience-content .date {
    color: #6b7280;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.experience-content .position {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.experience-content ul {
    list-style: none;
}

.experience-content li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.experience-content li::before {
    content: "\2022"; /* Unicode for bullet • */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* GitHub icon styles */
.github-icon {
    display: block;
    width: 28px;
    height: 28px;
    margin-top: 8px;
    margin-left: 0;
}

.github-icon svg {
    width: 100%;
    height: 100%;
    fill: #6b7280;
    transition: fill 0.3s;
}

.github-icon:hover svg {
    fill: var(--secondary-color);
}

/* Contact Section */
.contact-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.contact-item svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
    flex-shrink: 0;
}

.contact-item a {
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-color);
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* Projects Section - With expand/collapse */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.project-content {
    padding: 20px;
}

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

.project-content p {
    color: #4b5563;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tech-tag {
    background-color: #f3f4f6;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #4b5563;
}

.project-details {
    margin-top: 15px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease-out;
}

.project-details.expanded {
    height: auto;
}

.project-details ul {
    list-style: none;
    padding-left: 0;
}

.project-details ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.project-details ul li::before {
    content: "\2022"; /* Unicode for bullet • */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.toggle-details {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.toggle-details:hover {
    text-decoration: underline;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.education-card {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.education-card h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.education-card .degree {
    font-weight: 600;
    margin-bottom: 5px;
}

.education-card .date {
    color: #6b7280;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Footer */
footer {
    background-color: #1f2937;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #e5e7eb;
    padding: 5px 10px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.footer-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.copyright {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* 列表项样式调整 */
.list-item {
    position: relative;
    padding-left: 20px;
}

.list-item::before {
    content: "\25CF"; /* Unicode for black circle • */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 0.7em;
    top: 0.5em;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    nav {
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 70%;
        height: 100vh;
        gap: 20px;
        padding: 80px 20px 30px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        overflow-y: auto;
    }

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

    .nav-links a {
        font-size: 1.2rem;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        display: block;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

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

    .contact-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-item {
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-links a {
        font-size: 1rem;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .contact-list {
        grid-template-columns: 1fr;
    }

    .nav-links {
        width: 85%;
    }

    #about {
        padding-top: 80px;
    }
}
