/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #0056b3;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --header-bg: #333;
    --footer-bg: #333;
    --white: #fff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--header-bg);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 60px 0;
    background: var(--white);
}

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

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--text-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('image/LiKeiBai_icon_transparent.png') no-repeat center center/cover;
    height: 60vh;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Fallback/Overlay styling to ensure text readability if image is the icon */
    background-color: #333;
    background-blend-mode: overlay;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero .btn {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1.1rem;
    padding: 15px 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

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

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.about-img {
    flex: 1;
    max-width: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.about-img img {
    width: 100%;
    display: block;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

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

.project-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.project-card h3 {
    margin-bottom: 10px;
}

.project-card p {
    margin-bottom: 10px;
    color: #666;
}

.project-card .btn {
    align-self: flex-start;
}

/* Lists (Education, Awards, Courses) */
.info-list {
    list-style: none;
    margin: 0 auto;
}

.info-list li {
    background: var(--white);
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    border-left: 5px solid var(--primary-color);
}

.info-list li h3 {
    margin-bottom: 5px;
}

.info-list li span {
    color: #777;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border-top: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.skill-category h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-category h3 i {
    color: var(--primary-color);
}

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

.skill-tag {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #90caf9;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3);
}

/* Course Cards */
.course-card {
    border-left: 5px solid var(--primary-color) !important;
}

.course-card .course-code {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

.course-card h3 {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 4px;
}

.course-card .course-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
}

.course-card .course-meta,
.experience-item .course-meta {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #888;
}

.course-card .course-meta i,
.experience-item .course-meta i {
    margin-right: 5px;
    font-size: 0.8rem;
}

/* Skill Bubbles (reusable across sections) */
.skill-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.skill-bubble {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #90caf9;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-bubble:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3);
}

/* Experience Card */
.experience-item {
    border-left: 5px solid var(--primary-color);
}

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

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

.social-links {
    margin-top: 10px;
}

.social-links a {
    color: var(--white);
    margin: 0 10px;
    text-decoration: none;
    font-size: 1.2rem;
}

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    /* Keep header container as row for Logo + Hamburger */
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
    }

    /* Position nav absolutely to remove it from flex flow (fixing spacing) */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
    }

    .nav-menu {
        display: none;
        /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: var(--header-bg);
        padding: 20px 0;
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        display: flex;
        /* Show when active */
    }

    nav ul li {
        margin: 15px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Adjust About section for mobile */
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-text {
        text-align: center;
        min-width: auto;
        /* Reset min-width to avoid overflow */
        width: 100%;
    }

    /* Force 1 column for projects on mobile to avoid overflow on small screens */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Adjust container padding if needed */
    .container {
        padding: 0 15px;
    }
}