/* Author: Xuanpeng Zhao */
/* Date: 2025-06-12 */
/* Description: Main CSS file for the website - Reorganized and Optimized */

/* Author: Xuanpeng Zhao */
/* Date: 2025-06-12 */
/* Description: Main CSS file for the website */

/* Global style reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

p {
    margin-bottom: 1.5em;
}
/* Basic styles */
:root {
    --primary-blue: #4a69bd;
    --secondary-blue: #7f7fd5;
    --text-color: #333;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --max-width: 1500px;
    --border-radius: 24px;
    --box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    --nav-height: 120px;
    --scroll-offset: 140px;
    --gradient-blue: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    min-height: 100vh;
}

/* Container styles */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-top: 2rem;
}

/* Header styles */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    max-width: 1280px;
    margin: 0 auto 3rem;
}

.header-content {
    text-align: left;
    min-width: 600px;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid white;
    box-shadow: var(--box-shadow);
    flex-shrink: 0;
}

.name {
    font-size: 4.5rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.title {
    font-size: 1.7rem;
    color: var(--card-background);
    margin-bottom: 1rem;
}

.institution {
    font-size: 1.7rem;
    color: var(--card-background);
    margin-bottom: 0.5rem;
}

.advisor {
    font-size: 1.7rem;
    color: var(--card-background);
    margin-bottom: 1rem;
}

.summary {
    font-size: 1.7rem;
    max-width: 1280px;
    margin: 0 auto;
    color: var(--card-background);
    text-align: center;
    padding: 0 2rem;
}

/* Section styles */
.section {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    padding: 2rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    scroll-margin-top: var(--scroll-offset);
}

.section-title {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 3rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.section-title:hover {
    color: var(--primary-blue);
}

/* Project section styles */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 1200px;
    transition: box-shadow 0.3s ease;
}

.project-header {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.project-header:hover {
    background: var(--gradient-blue);
}

.project-header:hover h3 {
    color: var(--background-color);
}
.project-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header h3 {
    color: var(--primary-blue);
    font-size: 1.7rem;
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.project-card.expanded .project-details {
    max-height: none;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.5s ease;
}

.project-image {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-img {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-content {
    padding: 2rem;
}

.project-content p {
    color: var(--text-primary);
    font-size: 1.5rem;
     
    margin-bottom: 0rem;
    text-align: justify;
    white-space: normal;
}

.paper-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: var(--background-color);
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.paper-link:hover {
    background: var(--gradient-blue);
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.paper-link i {
    font-size: 1.1em;
}

/* Hover effects */
.project-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== Responsive Styles for Projects ===== */

/* Link styles */
.link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--secondary-blue);
}

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

.section {
    animation: fadeIn 0.5s ease-out;
}

/* Print styles */

/* Navigation bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    z-index: 1001;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.8rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    background: transparent;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
    transform-origin: left center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 2rem;
    margin-left: 3rem;
}

.social-icon {
    color: var(--text-color);
    font-size: 2.4rem;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-blue);
}

/* Mobile Navigation Styles */

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: url('../assets/images/background.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--nav-height) 0 2rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 105, 189, 0.9), rgba(127, 127, 213, 0.9));
}

.hero-section .container {
    position: relative;
    z-index: 1;
    background: transparent;
    box-shadow: none;
}

/* Main Content */
.main-content {
    background: var(--background-color);
    padding: 2rem 0;
     
}

.main-content .container {
    background: var(--card-background);
    box-shadow: var(--box-shadow);
}

/* Project Grid */
.project-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

/* Contact Section */
.contact-info {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--background-color);
    color: var(--primary-blue) ;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: var(--gradient-blue);
    color: var(--background-color);
}

.button i {
    font-size: 1.2em;
}

.publication-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.publication-item {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.publication-item h3 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.publication-item ul {
    list-style: none;
    padding: 0;
}

.publication-item li {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.publication-item li:before {
    content: "•";
    color: var(--primary-blue);
    position: absolute;
    left: 0;
    font-size: 1.6rem;
}

.publication-item li:last-child {
    margin-bottom: 0;
}

.publication-item strong {
    color: var(--primary-blue);
}

.publication-item em {
    font-style: italic;
    color: var(--text-color);
}

.awards-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.award-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.award-item:hover {
    transform: translateY(-5px);
}

.award-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.award-content {
    flex: 1;
}

.award-content h3 {
    color: var(--primary-blue);
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
}

.award-date {
    color: var(--primary-blue);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.award-content p {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.skill-category {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
    position: relative;
}

.category-title {
    font-size: 2rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.skill-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 0.5rem;
    position: relative;
    --hive-bubble-size: 100px;
    --hive-gap: 1rem;
}

.skill-row {
    display: flex;
    gap: var(--hive-gap);
    justify-content: center;
    position: relative;
     
}

.skill-bubble {
    width: var(--hive-bubble-size);
    height: var(--hive-bubble-size);
    background: var(--card-background);
  
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    transform: scale(0.95);
    margin-bottom: 2rem;
}

.skill-bubble i,
.skill-bubble img {
    font-size: calc(var(--hive-bubble-size) * 0.5);
    width: calc(var(--hive-bubble-size) * 0.5);
    height: calc(var(--hive-bubble-size) * 0.5);
    /* margin-bottom: 0.5rem; */
    color: var(--primary-blue);
    transition: all 0.3s ease;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.skill-bubble span {
    font-size: calc(var(--hive-bubble-size) * 0.2);
    color: var(--text-color);
    text-align: center;
    transition: all 0.3s ease;
    opacity: 1;
    transform: none;
    position: absolute;
    bottom: -1.8rem;
    white-space: nowrap;
    width: 100%;
}

/* Hover effect */
.skill-bubble:hover {
    transform: scale(1.1);
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: var(--gradient-blue);
}

.skill-bubble:hover i,
.skill-bubble:hover img {
    color: white;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.skill-bubble:hover span {
    color: var(--primary-blue);
}

/* For skills without suitable icons, add default image style */
.skill-bubble img.default-icon {
    opacity: 0.8;
    filter: grayscale(0.3) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.skill-bubble:hover img.default-icon {
    opacity: 1;
    filter: grayscale(0) brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Reponse layout */

/* Status label styles */
.status-label {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-completed {
    background-color: #e6f4ea;
    color: #1e7e34;
}

.status-ongoing {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-published {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-onhold {
    background-color: #f5f5f5;
    color: #757575;
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.project-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Tag Colors */
.tag-ml {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tag-cv {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.tag-ros {
    background-color: #fff3e0;
    color: #f57c00;
}

.tag-simulation {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.tag-hil {
    background-color: #e0f7fa;
    color: #00838f;
}

.tag-sensor {
    background-color: #fce4ec;
    color: #c2185b;
}

.tag-embedded {
    background-color: #e8eaf6;
    color: #3949ab;
}

.tag-v2x {
    background-color: #e8f6f5;
    color: #39aba9;
}

.tag-cpp {
    background-color: #f6f4e8;
    color: #ab9239;
}

.tag-python {
    background-color: #e9f6e8;
    color: #48ab39;
}

.tag-cloud {
    background-color: #f1f8e9;
    color: #689f38;
}

.tag-security {
    background-color: #ffebee;
    color: #c62828;
}

.tag-iot {
    background-color: #fff8e1;
    color: #ff8f00;
}

/* ===================================================================== */
/* RESPONSIVE DESIGN SECTION */
/* ===================================================================== */

@media (max-width: 1200px) {
    .project-card {
            width: 100%;
        }
        
        .project-img {
            width: 100% !important;
        }
    .skills-container {
            grid-template-columns: 1fr;
            gap: 2rem;
        }
}

@media (max-width: 900px) {
    .skill-cluster {
            --hive-bubble-size: 70px;
        }
        
        .category-title {
            font-size: 1.8rem;
        }
}

@media (max-width: 768px) {
    .container {
        /* width: 300px; */
        padding: 0rem;
    }

    .section {
        font-size: 1.1rem;
        
    }


    .project-header {
            padding: 1.2rem;
        }
    
        .project-header h3 {
            font-size: 1.4rem;
        }
    
     
        .project-content {
            font-size: 0.9rem;
            padding: 1rem;
        }
    
        .section-title {
            font-size: 2rem;
        }
    
        .project-card {
            flex-direction: column;
        }
        
        .project-image {
            flex: 0 0 200px;
            width: 100%;
        }
    
        .button {
            font-size: 1.2rem;
            padding: 1rem 2rem;
        }
    
        .header-main {
            flex-direction: column;
            text-align: center;
            gap: 2rem;
        }
    
        .header-content {
            text-align: center;
            min-width: auto;
            width: 100%;
        }
    
        .contact-btn {
            padding: 0.8rem 1.5rem;
            font-size: 0.9rem;
        }
    
        .status-label {
            padding: 0.3rem 0.8rem;
            font-size: 0.8rem;
        }
    :root {
            --nav-height: 80px;
            --mobile-menu-width: 50%;
            --mobile-menu-bg: linear-gradient(135deg, rgba(74, 105, 189, 0.95), rgba(127, 127, 213, 0.95));
        }
    
        .nav-container {
            padding: 0 1.5rem;
        }
    
        .nav-logo {
            font-size: 2.4rem;
        }
    
        .nav-toggle {
            display: flex;
        }
    
        .nav-menu {
            position: fixed;
            top: var(--nav-height);
            right: -100%;
            width: var(--mobile-menu-width);
            height: calc(100vh - var(--nav-height));
            background: var(--mobile-menu-bg);
            backdrop-filter: blur(10px);
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding: 2rem 0;
            gap: 2rem;
            transition: right 0.3s ease;
            overflow-y: auto;
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        }
    
        .nav-menu.active {
            right: 0;
        }
    
        .nav-link {
            font-size: 1.6rem;
            padding: 1rem 2rem;
            width: 100%;
            text-align: center;
            color: white;
        }
    
        .nav-link:hover {
            color: rgba(255, 255, 255, 0.8);
        }
    
        .social-icons {
            display: none;
        }
    
        /* Add social icons to mobile menu */
        .nav-menu .social-icons {
            display: flex;
            margin: 2rem 0 0;
            justify-content: center;
            gap: 2rem;
            width: 100%;
            padding: 1rem 0;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }
    
        .nav-menu .social-icon {
            font-size: 2rem;
            color: white;
        }
    
        .nav-menu .social-icon:hover {
            color: rgba(255, 255, 255, 0.8);
        }
    
        /* Adjust other responsive styles */
        .name {
            font-size: 2.8rem;
        }
    
        .title, .institution, .advisor {
            font-size: 1.4rem;
        }
    
        .summary {
            font-size: 1.2rem;
            padding: 0 1.5rem;
        }
    
        .section-title {
            font-size: 2.2rem;
        }
    
        .paper-link {
            font-size: 1.2rem;
            padding: 0.6rem 1.2rem;
        }
    
        .award-content h3 {
            font-size: 1.5rem;
        }
    
        .award-date {
            font-size: 1.2rem;
        }
    
        .award-content p {
            font-size: 1.2rem;
        }
    
        .publication-item h3 {
            font-size: 1.6rem;
        }
    
        .publication-item li {
            font-size: 1.2rem;
        }
    .award-item {
            flex-direction: column;
            text-align: center;
            gap: 1rem;
        }
        
        .award-icon {
            margin: 0 auto;
        }
    .project-tag {
        font-size: 0.9rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 600px) {
    .skill-cluster {
            --hive-bubble-size: 60px;
            --hive-gap: 0.8rem;
        }
        
        .category-title {
            font-size: 1.4rem;
            margin-bottom: 0rem;
        }
        
        .skill-bubble span {
            font-size: 0.8rem;
            bottom: -20px;
        }
}

@media (max-width: 480px) {

    .section-title {
            font-size: 1.8rem;
        }
        
        .project-header {
            padding: 1rem;
        }
        
        .project-header h3 {
            font-size: 1.2rem;
        }
        
        .project-content p {
            font-size: 0.85rem;
        }
        
        .contact-btn {
            padding: 0.7rem 1.2rem;
            font-size: 0.85rem;
        }
        
        .status-label {
            padding: 0.2rem 0.6rem;
            font-size: 0.75rem;
        }
    :root {
            --nav-height: 70px;
            --mobile-menu-width: 60%;
        }
    
        .nav-logo {
            font-size: 2rem;
        }
    
        .nav-link {
            font-size: 1.3rem;
            padding: 0.8rem 1.5rem;
        }
    
        .nav-menu {
            padding: 1.5rem 0;
            gap: 1.5rem;
        }
    
        .nav-menu .social-icon {
            font-size: 1.8rem;
        }
    
        /* Further adjust font sizes for smaller screens */
        .name {
            font-size: 2.4rem;
        }
    
        .title, .institution, .advisor {
            font-size: 1.2rem;
        }
    
        .summary {
            font-size: 1.1rem;
            padding: 0 1rem;
        }
    
        .paper-link {
            font-size: 1rem;
            padding: 0.5rem 1rem;
        }
    
        .award-content h3 {
            font-size: 1.2rem;
        }
    
        .award-date {
            font-size: 1rem;
        }
    
        .award-content p {
            font-size: 1rem;
        }
    
        .publication-item h3 {
            font-size: 1.2rem;
        }
    
        .publication-item li {
            font-size: 1rem;
        }
    .project-tag {
        font-size: 0.8rem;
        padding: 0.15rem 0.5rem;
    }
}