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

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #0f3460;
    --accent-color: #16213e;
    --highlight-color: #e94560;
    --highlight-blue: #00d4ff;
    --text-color: #e4e4e4;
    --text-secondary: #a0a0a0;
    --light-bg: #16213e;
    --dark-bg: #0f1419;
    --card-bg: #1a1a2e;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 30px rgba(0, 212, 255, 0.3);
    --glow: 0 0 20px rgba(0, 212, 255, 0.5);
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

nav.scrolled {
    padding: 0.5rem 0;
    background: rgba(26, 26, 46, 0.98);
    box-shadow: var(--glow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--highlight-blue), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--highlight-blue);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--highlight-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--highlight-blue);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--highlight-blue);
    margin: 3px 0;
    transition: 0.3s;
    box-shadow: 0 0 5px var(--highlight-blue);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1419 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(233, 69, 96, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    animation: fadeInUp 0.8s ease;
    background: linear-gradient(135deg, var(--highlight-blue), var(--white), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    color: var(--text-color);
}

.hero-content .tagline {
    font-size: 1.05rem;
    opacity: 0.8;
    animation: fadeInUp 0.8s ease 0.4s backwards;
    color: var(--text-secondary);
}

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

/* Section Styles */
section {
    padding: 3.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 0.8rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.8rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--highlight-blue), var(--highlight-color));
    border-radius: 2px;
    box-shadow: 0 0 10px var(--highlight-blue);
}

.section-description {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    align-items: center;
    margin-top: 2rem;
}

.about-image {
    width: 100%;
    max-width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--highlight-blue);
    box-shadow: var(--shadow);
    margin: 0 auto;
    border: 3px solid var(--highlight-blue);
}

.about-text h3 {
    color: var(--highlight-blue);
    margin-bottom: 0.8rem;
    font-size: 1.6rem;
}

.about-text p {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Research Section */
.research-timeline {
    margin-top: 2rem;
    position: relative;
}

.research-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--highlight-blue);
}

.research-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
    border-left-color: var(--highlight-color);
}

.research-period {
    font-weight: 600;
    color: var(--highlight-blue);
    font-size: 0.95rem;
    padding-top: 0.3rem;
}

.research-content h3 {
    color: var(--white);
    margin-bottom: 0.3rem;
    font-size: 1.35rem;
}

.research-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-style: italic;
}

.research-highlights {
    list-style: none;
    padding-left: 0;
}

.research-highlights li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

.research-highlights li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--highlight-blue);
    font-weight: bold;
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

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

.project-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(233, 69, 96, 0.2) 0%, transparent 50%);
}

.project-content {
    padding: 1.3rem;
}

.project-content h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.tag {
    background: var(--light-bg);
    padding: 0.25rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--highlight-blue);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    text-decoration: none;
    color: var(--highlight-blue);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.project-link:hover {
    color: var(--highlight-color);
}

/* Teaching Section - Horizontal Layout */
.featured-course {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: var(--shadow-hover);
    margin-top: 2rem;
    border: 2px solid var(--highlight-blue);
    position: relative;
    overflow: hidden;
}

.featured-course::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(233, 69, 96, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.course-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-bg);
    position: relative;
    z-index: 1;
}

.course-header-btn {
    margin-left: auto;
    padding: 0.8rem 1.5rem;
    white-space: nowrap;
}

.course-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--highlight-blue), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.course-title-section h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.course-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.course-summary {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.course-summary > p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.course-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.course-info h4,
.course-topics h4 {
    color: var(--highlight-blue);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.course-info p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-size: 0.98rem;
}

.course-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.2rem;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8rem;
    background: var(--light-bg);
    border-radius: 10px;
    flex: 1;
    max-width: 130px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--highlight-blue);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--highlight-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem;
    background: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
    font-size: 0.9rem;
}

.topic-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--highlight-blue);
}

.topic-icon {
    color: var(--highlight-blue);
    font-weight: bold;
    font-size: 1.1rem;
}

.topic-item span:not(.topic-icon) {
    color: var(--text-secondary);
}

.primary-btn {
    padding: 0.9rem 1.8rem;
    background: linear-gradient(135deg, var(--highlight-blue), var(--secondary-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    border: 1px solid var(--highlight-blue);
    font-size: 0.95rem;
    display: inline-block;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

/* Textbook Section */
.textbook-section {
    margin-top: 3rem;
}

.textbook-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    border-left: 4px solid var(--highlight-color);
    border: 1px solid rgba(233, 69, 96, 0.2);
}

.textbook-icon {
    font-size: 3.5rem;
}

.textbook-content {
    flex: 1;
}

.textbook-content h3 {
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.textbook-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(233, 69, 96, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--highlight-blue), var(--highlight-color));
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Books Section */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.book-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: start;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--highlight-blue);
}

.book-cover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(233, 69, 96, 0.2) 0%, transparent 50%);
}

.book-icon {
    font-size: 4rem;
    position: relative;
    z-index: 1;
}

.book-content {
    padding: 1.8rem;
}

.book-content h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.book-subtitle {
    color: var(--highlight-blue);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.book-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.book-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.book-detail-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-icon {
    font-size: 1.1rem;
}

.book-actions {
    display: flex;
    gap: 1rem;
}

.book-actions .primary-btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
}

/* Teaching History */
.teaching-history {
    margin-top: 4rem;
}

.teaching-history h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.teaching-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.history-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--highlight-blue);
}

.history-period {
    font-weight: 600;
    color: var(--highlight-blue);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.history-content h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
}

.history-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.teaching-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--highlight-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.teaching-link:hover {
    color: var(--highlight-color);
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 3rem auto;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.contact-item:hover {
    border-color: var(--highlight-blue);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.contact-item span {
    font-size: 1.5rem;
}

.contact-item a {
    color: var(--highlight-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

footer p {
    margin: 0.5rem 0;
}

footer p:first-child {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        border-top: 1px solid rgba(0, 212, 255, 0.2);
    }

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

    .mobile-menu {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

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

    section h2 {
        font-size: 2rem;
    }

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

    /* Research responsive */
    .research-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .research-period {
        padding-top: 0;
    }

    /* Teaching responsive */
    .course-header {
        flex-direction: column;
        text-align: center;
    }

    .course-header-btn {
        margin-left: 0;
        width: 100%;
    }

    .course-summary > p {
        font-size: 1rem;
    }

    .course-stats {
        flex-direction: row;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .stat-item {
        min-width: 100px;
    }

    .course-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .course-actions {
        flex-direction: column;
    }

    .textbook-card {
        flex-direction: column;
        text-align: center;
    }

    .teaching-history-grid {
        grid-template-columns: 1fr;
    }

    .books-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .book-card {
        grid-template-columns: 1fr;
    }

    .book-cover {
        padding: 2rem;
        height: auto;
    }

    .book-icon {
        font-size: 3rem;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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