/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo span {
    font-size: 1.3rem;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.hero-content {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    color: var(--white);
    width: 100%;
    max-width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-school {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.6s backwards;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.hero-image {
    animation: fadeInRight 0.8s ease;
}

.hero-profile-img {
    width: 100%;
    max-width: 400px;
    height: 400px;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 5px solid rgba(255, 255, 255, 0.2);
}

.image-placeholder {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.image-placeholder svg {
    color: var(--white);
    opacity: 0.7;
}

.image-placeholder p {
    color: var(--white);
    margin-top: 1rem;
    opacity: 0.7;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 24px;
    border-left: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(-45deg);
    animation: scroll 2s infinite;
}

/* Section Styles */
section {
    padding: 80px 20px;
    overflow-x: hidden;
    width: 100%;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* About Section */
.about {
    background: var(--light-bg);
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.about-image {
    width: 100%;
    max-width: 300px;
}

.about-profile-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 4px solid var(--primary-color);
}

.about-image .image-placeholder {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 2px dashed var(--primary-color);
}

.about-image .image-placeholder svg {
    color: var(--primary-color);
}

.about-text {
    min-width: 0;
    overflow: visible;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--text-dark);
    word-wrap: break-word;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.skills, .interests {
    margin-top: 2rem;
}

.skills h4, .interests h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--gradient-1);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.interests ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.interests li {
    color: var(--text-light);
    padding-left: 1.5rem;
    position: relative;
}

.interests li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.project-card .project-image {
    background: var(--light-bg);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-card .image-placeholder {
    background: transparent;
    padding: 0;
    border: none;
}

.project-card .image-placeholder svg {
    color: var(--primary-color);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Journey Section */
.journey {
    background: var(--light-bg);
}

.timeline {
    max-width: 800px;
    margin: 3rem auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-1);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.timeline-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    flex: 1;
}

.timeline-content h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.6;
}

.journey-img {
    width: 100%;
    max-width: 500px;
    height: 280px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    margin-top: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
}

.journey-image-placeholder {
    margin-top: 1rem;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 10px;
    text-align: center;
    color: var(--text-light);
    border: 2px dashed var(--primary-color);
}

.reflection {
    margin-top: 4rem;
}

.reflection h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.reflection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.reflection-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.reflection-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.reflection-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-content-static {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    color: var(--white);
}

.contact-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.closing-message {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 15px;
}

.closing-message p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 3rem 20px;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.bao-credit {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scroll {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translate(-10px, -10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(-45deg) translate(10px, 10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        order: -1;
        margin-bottom: 1.5rem;
    }

    .hero-text {
        order: 1;
    }

    .scroll-indicator {
        display: none;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
    }

    .about-image {
        max-width: 100%;
        display: flex;
        justify-content: center;
    }

    .about-text {
        margin-top: 0;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .about-text h3 {
        font-size: 1.75rem;
        word-break: break-word;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

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

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        gap: 1rem;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .interests ul {
        grid-template-columns: 1fr;
    }

    .hero-profile-img {
        max-width: 300px;
        height: 300px;
    }

    .about-profile-img {
        max-width: 250px;
        height: 250px;
    }

    .journey-img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 15px;
    }

    .hero {
        padding: 100px 15px 80px;
        min-height: auto;
    }

    .hero-content {
        gap: 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-school {
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        position: relative;
    }

    .hero-buttons .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        white-space: nowrap;
        width: auto;
        min-width: 200px;
        display: block;
    }

    .section-title {
        font-size: 1.75rem;
    }

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

    .hero-profile-img {
        max-width: 250px;
        height: 250px;
    }

    .about-profile-img {
        max-width: 200px;
        height: 200px;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .project-img {
        height: 200px;
    }

    .journey-img {
        height: 180px;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
}
