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

body {
    font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
    position: relative;
}

.nav-logo {
    position: absolute;
    left: 20px;
}

.nav-logo h2 {
    color: #2563eb;
    font-weight: 600;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    position: relative;
}

.nav-menu::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.nav-menu.has-active::before {
    opacity: 1;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 10px 16px;
    border-radius: 20px;
    outline: none;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 20px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.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 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,200 1000,1000"/></svg>');
    background-size: cover;
}

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

.language-toggle {
    margin-bottom: 1rem;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lang-btn.active,
.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-btn:active {
    transform: scale(0.95);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both;
}

.hero-motto {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 1.0s both;
}

.hero-info {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 1.2s both;
}

.hero-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-image {
    text-align: center;
    animation: fadeInRight 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.profile-photo:hover {
    transform: scale(1.05) rotate(2deg);
}

.profile-photo:active {
    transform: scale(0.95);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.profile-img[src*="eddy_anime"] {
    object-fit: contain;
    background: white;
    padding: 1px;
    object-position: center center;
    transform: scale(1.40) translateX(4px) translateY(4.5px);
}

.profile-img.flipping {
    transform: rotateY(180deg);
    opacity: 0;
}

.avatar-hint {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    pointer-events: none;
}

.profile-photo:hover .avatar-hint {
    opacity: 1;
}

/* Quote Section */
.quote-section {
    padding: 60px 0;
    background: #f8fafc;
    text-align: center;
}

.quote-with-images {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.quote-image {
    height: 125px;
    border-radius: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-image:hover {
    transform: scale(1.05);
}

.quote-section blockquote {
    font-size: 1.5rem;
    font-style: italic;
    color: #555;
    flex: 1;
    margin: 0;
}

.quote-section .japanese {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #666;
}

.quote-section cite {
    display: block;
    margin-top: 1.5rem;
    font-size: 1rem;
    color: #888;
}

/* Common Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    text-align: center;
    color: #1e293b;
}

/* About Section */
.about-section {
    background: white;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    width: 100%;
}

.research-section {
    margin-top: 2rem;
}

.research-title {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.research-interests {
    margin: 0;
}

.research-item {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.research-item h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

/* News Section */
.news-section {
    background: #f8fafc;
}

.news-timeline {
    max-width: 900px;
    margin: 0 auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.news-date {
    font-weight: 600;
    color: #2563eb;
    font-size: 0.95rem;
}

.news-content {
    display: flex;
    gap: 1rem;
}

.news-emoji {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.news-content p {
    line-height: 1.7;
}

/* Publications Section */
.publications-section {
    background: white;
}

.publication-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
}

.publication-item {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 3.5rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.publication-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.publication-image {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.publication-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.publication-image:hover img {
    transform: scale(1.05);
}

.publication-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2563eb;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 1;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.publication-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e3a8a;
    font-weight: 500;
}

.highlight {
    background-color: #FFF3A3; /* A softer yellow for light mode */
    padding: 2px 4px;
    border-radius: 4px;
    color: #5D4300;
}

.publication-content p {
    color: #4b5563;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.pub-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pub-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Statistics Section */
.stats-section {
    background: #ffffff;
    padding: 80px 0;
}

.stats-container {
    background: transparent;
    border: none;
    padding: 20px;
    box-shadow: none;
    margin-top: 20px;
}

#clustrmaps-widget {
    min-height: 200px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transform: scale(0.85);
    transform-origin: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

#clustrmaps-widget img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    opacity: 0.8;
}

/* 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);
    }
}

/* Dark Mode */
.dark-mode {
    background-color: #1a1a1a;
    color: #f5f5f5;
}

.dark-mode .navbar {
    background: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid #333;
}

.dark-mode .nav-logo h2 {
    color: #4a9eff;
}

.dark-mode .nav-link {
    color: #f5f5f5;
}

.dark-mode .nav-link:hover,
.dark-mode .nav-link.active {
    color: #4a9eff;
}

.dark-mode .nav-menu::before {
    background: linear-gradient(90deg, #4a9eff, #63b3ed);
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.4);
}

.dark-mode .hamburger .bar {
    background: #f5f5f5;
}

.dark-mode .lang-btn {
    background: rgba(45, 55, 72, 0.3);
    border-color: rgba(74, 144, 255, 0.3);
    color: #f5f5f5;
}

.dark-mode .lang-btn.active,
.dark-mode .lang-btn:hover {
    background: rgba(74, 144, 255, 0.2);
    border-color: rgba(74, 144, 255, 0.5);
    color: #ffffff;
}

.dark-mode .hero {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.dark-mode .hero-title {
    background: linear-gradient(45deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark-mode .hero-subtitle,
.dark-mode .hero-motto,
.dark-mode .hero-info {
    color: #f5f5f5;
}

.dark-mode .quote-section,
.dark-mode .news-section {
    background: #2d3748;
}

.dark-mode .quote-with-images {
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid #4a5568;
}

.dark-mode .quote-section blockquote p {
    color: #f5f5f5;
}

.dark-mode .about-section,
.dark-mode .publications-section,
.dark-mode .stats-section {
    background: #1a1a1a;
}

.dark-mode .section-title {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dark-mode .research-item,
.dark-mode .news-item,
.dark-mode .publication-item {
    background: #2d3748;
    border-color: #4a5568;
    color: #f0f0f0;
}

.dark-mode .research-item h4,
.dark-mode .publication-content h4 {
    color: #ffffff;
}

.dark-mode .about-text p,
.dark-mode .research-item p,
.dark-mode .news-content p,
.dark-mode .publication-content p {
    color: #e8e8e8;
}

.dark-mode .news-date {
    color: #f5f5f5;
    font-weight: 600;
}

.dark-mode .research-title {
    color: #ffffff;
}

.dark-mode .research-item:hover,
.dark-mode .news-item:hover,
.dark-mode .publication-item:hover {
    background: #374151;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark-mode .publication-badge {
    background: #374151;
    color: #d1d5db;
}

.dark-mode .highlight {
    background-color: #6D5F00; /* A darker, less intrusive yellow for dark mode */
    color: #FFFBEA;
}

.dark-mode .pub-link {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.4);
}

.dark-mode .pub-link:hover {
    color: #63b3ed;
}

.dark-mode .social-link {
    background: rgba(45, 55, 72, 0.3);
    border-color: rgba(74, 144, 255, 0.3);
    color: #f0f0f0;
}

.dark-mode .social-link:hover {
    background: rgba(74, 144, 255, 0.2);
}

.dark-mode .footer {
    background: #2d3748;
    color: #f0f0f0;
}

.dark-mode .avatar-hint {
    background: rgba(45, 55, 72, 0.9);
    color: #f5f5f5;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #374151, #4b5563);
    border: 2px solid #6b7280;
    color: #f9fafb;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    border-color: #9ca3af;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #d97706, #b45309);
    border: 2px solid #92400e;
    color: #fbbf24;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.dark-mode .dark-mode-toggle:hover {
    background: linear-gradient(135deg, #b45309, #92400e);
    border-color: #78350f;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
    color: #fbbf24;
    transform: scale(1.1);
}

/* Genshin Impact Link */
.genshin-impact-section {
    margin: 2rem 0;
    text-align: center;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 1.4s both;
    padding: 0 1rem;
}

.genshin-impact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(100% - 2rem);
    box-sizing: border-box;
}

.genshin-impact-link:hover {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.genshin-icon {
    font-size: 2rem;
}

.genshin-text {
    font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0.5px;
}

.genshin-sparkle {
    font-size: 1.2rem;
}

.dark-mode .genshin-impact-link {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.dark-mode .genshin-impact-link:hover {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 6px 16px rgba(79, 172, 254, 0.3);
}

/* RedNote Icon */
.rednote-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-right: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
}

.social-link:hover .rednote-icon {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.social-link i,
.social-link .rednote-icon {
    display: inline-block;
    width: 16px;
    text-align: center;
}

/* Language Transitions */
[data-en][data-zh] {
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html[lang="zh-CN"] {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Inter', sans-serif;
}

html[lang="zh-CN"] .hero-title,
html[lang="zh-CN"] .section-title {
    font-weight: 600;
}

html[lang="zh-CN"] p,
html[lang="zh-CN"] .news-content p {
    line-height: 1.8;
}

html[lang="zh-CN"] .nav-link,
html[lang="zh-CN"] .social-link,
html[lang="zh-CN"] .pub-link {
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .profile-photo {
        width: 220px;
        height: 220px;
    }
    
    .publication-item {
        grid-template-columns: 360px 1fr;
        gap: 3rem;
    }
    
    .publication-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        text-align: center;
        width: 100%;
        max-width: 200px;
        padding: 12px 20px;
        margin: 0 auto;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .profile-photo {
        width: 180px;
        height: 180px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .quote-section blockquote {
        font-size: 1.2rem;
    }
    
    .quote-with-images {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .quote-image {
        height: 100px;
    }
    
    .about-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .news-item,
    .publication-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .news-date {
        text-align: left;
        padding-right: 0;
    }
    
    .publication-image {
        height: 200px;
        margin-bottom: 1.2rem;
    }

    #clustrmaps-widget {
        transform: scale(0.75);
        min-height: 150px;
        max-width: 450px;
    }

    .dark-mode-toggle {
        top: 80px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .dark-mode .nav-menu {
        background-color: #2d3748;
        border-top: 1px solid #4a5568;
        align-items: center;
        justify-content: center;
    }
    
    .dark-mode .nav-link {
        color: #e2e8f0;
        text-align: center;
    }
    
    .genshin-impact-section {
        padding: 0 1.5rem;
    }
    
    .genshin-impact-link {
        font-size: 1.3rem;
        padding: 1rem 1.5rem;
        max-width: 100%;
    }
    
    .genshin-icon {
        font-size: 1.8rem;
    }
    
    .genshin-sparkle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-link {
        padding: 10px 16px;
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-motto {
        font-size: 0.95rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .social-link {
        justify-content: center;
    }
    
    .profile-photo {
        width: 150px;
        height: 150px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .quote-section blockquote {
        font-size: 1rem;
    }
    
    .quote-image {
        height: 80px;
    }
    
    .quote-with-images {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .research-item,
    .news-item,
    .publication-item {
        padding: 1.5rem;
    }
    
    .news-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .news-emoji {
        align-self: flex-start;
    }
    
    .publication-links {
        gap: 0.5rem;
    }
    
    .pub-link {
        font-size: 0.9rem;
    }

    #clustrmaps-widget {
        transform: scale(0.65);
        min-height: 120px;
        max-width: 350px;
    }

    .dark-mode-toggle {
        top: 85px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .rednote-icon {
        width: 14px;
        height: 14px;
    }
    
    .genshin-impact-section {
        padding: 0 2rem;
    }
    
    .genshin-impact-link {
        font-size: 1.1rem;
        padding: 0.8rem 1.2rem;
        gap: 0.8rem;
        max-width: 100%;
    }
    
    .genshin-icon {
        font-size: 1.5rem;
    }
    
    .genshin-sparkle {
        font-size: 0.9rem;
    }
}

/* Accessibility & Performance */
button:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .navbar,
    .hamburger,
    .dark-mode-toggle {
        display: none;
    }
    
    .hero {
        background: none;
        color: black;
    }
    
    .hero-title {
        color: black;
        -webkit-text-fill-color: black;
    }
    
    section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}