:root {
    --primary-color: #EAE0D5;
    --secondary-color: #C6AC8F;
    --dark-color: #222;
    --text-color: #D3D3D3;
    --background-color: #1a1a1a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden; /* Prevent horizontal scrollbar from animations */
}

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

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 300;
}

h1 {
    font-size: 4rem;
    letter-spacing: 2px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header & Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/profile/谭倩琳02.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero-content .profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-content h1 {
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0; /* Start hidden */
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--primary-color);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0; /* Start hidden */
}


/* Navigation */
nav {
    position: sticky;
    top: 0;
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

nav a {
    color: var(--primary-color);
    margin: 0 1.5rem;
    font-size: 1rem;
    font-weight: 300;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 0.5rem;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: var(--secondary-color);
    transition: width 0.4s ease;
}

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

nav a:hover::after {
    width: 100%;
}

/* Fade-in Sections on Scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* About Section */
#about .about-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

#about h3 {
    margin-top: 2rem;
    border-left: 3px solid var(--secondary-color);
    padding-left: 1rem;
}

#about ul {
    list-style: none;
    padding-left: 1rem;
}

#about ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

#about ul li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

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

.gallery img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    border-radius: 4px;
}

.gallery img:hover {
    transform: scale(1.05);
    opacity: 0.85;
}

/* Contact Section */
#contact {
    text-align: center;
}

.contact-info {
    margin-top: 2rem;
    background: #222;
    padding: 2rem;
    border-radius: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
}
.contact-info:hover {
    transform: scale(1.02);
}

.contact-info .icon {
    vertical-align: middle;
    margin-right: 8px;
    width: 20px;
    height: 20px;
    fill: var(--secondary-color);
}

.contact-info p {
    margin: 0.5rem 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    background-color: #111;
    font-size: 0.9rem;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 85vh;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.modal-content, #caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Design */
@media(max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    nav {
        padding: 1rem 0.5rem;
    }
    
    nav a {
        margin: 0 0.8rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .hero {
        height: 60vh;
    }
    
    .hero-content .profile-image {
        width: 120px;
        height: 120px;
    }

    #about .about-content {
        flex-direction: column;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .gallery img {
        height: 250px;
    }
}

@media(max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .gallery img {
        height: 200px;
    }
    nav a {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
}
