/* CSS Variables for Dark Theme (Default) */
:root {
    --bg-color: #000000;
    --text-color: #e0e0e0;
    --link-color: #58a6ff;
    --link-hover-color: #79c0ff;
    --border-color: #30363d;
    --heading-color: #f0f6fc;
    --subheading-color: #c9d1d9;
    --muted-color: #8b949e;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #24292f;
    --link-color: #0969da;
    --link-hover-color: #0550ae;
    --border-color: #d1d9e0;
    --heading-color: #1f2328;
    --subheading-color: #656d76;
    --muted-color: #656d76;
}

/* Basic Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    text-decoration: underline;
    color: var(--link-hover-color);
}

/* Header and Navigation */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

nav a {
    margin-right: 20px;
    font-size: 1.1em;
    font-weight: 500;
    white-space: nowrap;
}

nav a:last-child {
    margin-right: 0;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
}

.theme-toggle i {
    font-size: 1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 15px 0;
        margin-bottom: 20px;
    }
    
    nav {
        flex: 1;
        justify-content: flex-start;
        gap: 5px;
        overflow-x: auto;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE 10+ */
        padding-right: 10px;
    }
    
    nav::-webkit-scrollbar {
        display: none; /* Safari and Chrome */
    }
    
    nav a {
        margin-right: 10px;
        font-size: 0.95rem;
        white-space: nowrap;
        flex-shrink: 0;
        padding: 4px 0;
    }
    
    .theme-toggle {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: 15px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    nav a {
        font-size: 0.9rem;
        margin-right: 8px;
    }
    
    .theme-toggle {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* Main Content */
h1, h2, h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    color: var(--heading-color);
    transition: color 0.3s ease, border-color 0.3s ease;
}
h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; color: var(--subheading-color); }

/* Two-column layout for header */
.intro-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}
.intro-text {
    flex: 3;
}
.intro-photo {
    flex: 1;
    text-align: center;
}
.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
}

/* Publication Entry Styles */
.publication-entry {
    display: flex;
    gap: 25px; /* 圖片和文字之間的距離 */
    margin-bottom: 40px; /* 每一個條目之間的距離 */
}
.publication-image {
    flex: 1;
    max-width: 220px; /* 圖片最大寬度 */
}
.publication-image img {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: border-color 0.3s ease;
}
.publication-details {
    flex: 3;
}
.publication-details h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.4em;
    border-bottom: none; /* 移除標題底線 */
}
.publication-details .authors {
    font-style: italic;
    color: var(--muted-color);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}
.publication-details .venue {
    font-weight: bold;
    margin-bottom: 15px;
}
.publication-details .links a {
    margin-right: 15px;
}

/* Experience Entry Styles */
.experience-entry {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}
.experience-entry:last-child {
    border-bottom: none;
}
.experience-entry h3 {
    margin-bottom: 10px;
}
.experience-entry p {
    margin-bottom: 15px;
    color: var(--subheading-color);
    transition: color 0.3s ease;
}

/* Social Icons Styles */
.social-icons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--muted-color);
    color: var(--bg-color);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* Light theme shadow adjustment */
[data-theme="light"] .social-icon:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Individual icon colors */
.social-icon.email:hover {
    background-color: #ea4335;
}

.social-icon.scholar:hover {
    background-color: #4285f4;
}

.social-icon.github:hover {
    background-color: #333;
}

.social-icon.linkedin:hover {
    background-color: #0077b5;
}

.social-icon.cv:hover {
    background-color: #dc3545;
}

/* Contact note styling */
.contact-note {
    font-size: 0.9em;
    color: var(--muted-color);
    font-style: italic;
    margin-top: 10px;
    transition: color 0.3s ease;
}

/* Lists */
ul {
    padding-left: 20px;
}
li {
    margin-bottom: 10px;
}

/* Photo Gallery Styles */
.activity-entry {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.activity-entry:last-child {
    border-bottom: none;
}

.sub-activity {
    margin: 25px 0;
    padding: 20px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sub-activity h4 {
    margin-top: 0;
    color: var(--heading-color);
    border-bottom: none;
    font-size: 1.1em;
}

.sub-activity h4 i {
    margin-right: 8px;
    color: var(--link-color);
}

.photo-gallery {
    margin: 20px 0;
}

.gallery-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--secondary-bg-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    align-items: center;
    justify-content: center;
}

.photo-slide.active {
    display: flex;
}

.photo-slide img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    background-color: transparent;
}

.photo-slide img:hover {
    transform: scale(1.03);
}

/* Photo caption styling */
.photo-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    /* Fallback for browsers that don't support backdrop-filter */
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 5;
}

[data-theme="light"] .photo-caption {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Video Gallery Styles */
.video-gallery {
    margin: 30px 0;
}

.video-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--secondary-bg-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: 500;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 20px 0;
}

.video-item {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-item h4 {
    margin: 0 0 10px 0;
    color: var(--heading-color);
    font-size: 1.1em;
}

.video-item p {
    margin: 10px 0 0 0;
    color: var(--muted-color);
    font-size: 0.9em;
}

/* Responsive video design */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-container {
        margin: 0 10px;
    }
}

.photo-slide img[src$=".jpg"], 
.photo-slide img[src$=".JPG"], 
.photo-slide img[src$=".png"], 
.photo-slide img[src$=".PNG"] {
    display: block;
}

/* Error and placeholder styling */
.photo-slide.image-error::after {
    content: "📷 照片載入中...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--muted-color);
    font-size: 18px;
    text-align: center;
    background-color: var(--secondary-bg-color);
    padding: 20px 30px;
    border-radius: 10px;
    border: 2px dashed var(--border-color);
    min-width: 200px;
}

.photo-slide.image-loaded {
    background-color: transparent;
}

/* Placeholder pattern for empty slides */
.photo-slide:not(.image-loaded):not(.image-error)::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 200px;
    background: repeating-linear-gradient(
        45deg,
        var(--border-color) 0px,
        var(--border-color) 10px,
        transparent 10px,
        transparent 20px
    );
    border-radius: 12px;
    opacity: 0.2;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.gallery-dots {
    text-align: center;
    padding: 15px 0;
    background-color: rgba(0, 0, 0, 0.05);
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: var(--muted-color);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--link-color);
    transform: scale(1.2);
}

.dot:hover {
    background-color: var(--link-hover-color);
    transform: scale(1.1);
}

/* Light theme gallery adjustments */
[data-theme="light"] .gallery-container {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .gallery-dots {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Responsive design for galleries */
@media (max-width: 1024px) {
    .gallery-container {
        max-width: 90%;
    }
    
    .gallery-wrapper {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .gallery-wrapper {
        height: 400px;
    }
    
    .gallery-btn {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-wrapper {
        height: 300px;
    }
    
    .gallery-container {
        margin: 0 10px;
    }
}

/* Interactive Hero Section */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: hidden;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 40px;
    padding: 20px;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
    align-items: center;
    text-align: center;
}

.hero-text {
    animation: slideInLeft 1s ease-out;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-greeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.wave-emoji {
    font-size: 2rem;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 50%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.greeting-text {
    font-size: 1.2rem;
    color: var(--subheading-color);
    font-weight: 500;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0 0 20px 0;
    line-height: 1.1;
}

.typewriter {
    display: inline-block;
}

.cursor {
    display: inline-block;
    color: var(--link-color);
    font-weight: normal;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-roles {
    font-size: 2rem;
    color: var(--link-color);
    font-weight: 600;
    margin-bottom: 30px;
    min-height: 2rem;
    text-align: center;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
    max-width: 500px;
    text-align: center;
}

.highlight {
    color: var(--link-color);
    font-weight: 600;
    position: relative;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.cta-primary, .cta-secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.cta-primary {
    background: linear-gradient(45deg, var(--link-color), #79c0ff);
    color: white;
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.3);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(88, 166, 255, 0.4);
}

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

.cta-secondary:hover {
    background: var(--border-color);
    transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

.profile-container {
    position: relative;
    z-index: 3;
    cursor: pointer;
    perspective: 1000px;
}

/* 3D Flip Card Styles */
.profile-flip-card {
    position: relative;
    width: 300px;
    height: 300px;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.profile-container.flipped .profile-flip-card {
    transform: rotateY(180deg);
}

.profile-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.profile-flip-card-front,
.profile-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
    transition: opacity 0.8s ease, z-index 0.8s ease;
}

.profile-flip-card-back {
    transform: rotateY(180deg);
}

/* Fallback for mobile browsers with poor 3D support */
@supports not (backface-visibility: hidden) {
    .profile-flip-card-front,
    .profile-flip-card-back {
        -webkit-backface-visibility: visible;
        backface-visibility: visible;
    }
    
    .profile-flip-card-front {
        z-index: 2;
        opacity: 1;
    }
    
    .profile-flip-card-back {
        z-index: 1;
        opacity: 0;
        transform: rotateY(0deg);
    }
    
    .profile-container.flipped .profile-flip-card-front {
        z-index: 1;
        opacity: 0;
    }
    
    .profile-container.flipped .profile-flip-card-back {
        z-index: 2;
        opacity: 1;
    }
    
    .profile-container.flipped .profile-flip-card {
        transform: rotateY(0deg);
    }
}

.profile-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

.profile-pic-hero {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--link-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 4;
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    animation: floatIcon var(--duration, 4s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.floating-icon:nth-child(1) { top: 10%; left: -5%; }
.floating-icon:nth-child(2) { top: 25%; right: -10%; }
.floating-icon:nth-child(3) { bottom: 25%; left: -8%; }
.floating-icon:nth-child(4) { bottom: 15%; right: -5%; }
.floating-icon:nth-child(5) { top: 55%; right: -15%; }

@keyframes floatIcon {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
        opacity: 0.6; 
    }
    25% { 
        transform: translate(10px, -15px) rotate(5deg); 
        opacity: 0.8; 
    }
    50% { 
        transform: translate(-5px, -25px) rotate(-3deg); 
        opacity: 1; 
    }
    75% { 
        transform: translate(-15px, -10px) rotate(7deg); 
        opacity: 0.7; 
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
    animation: fadeInUp 2s ease-out;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: var(--link-color);
    margin: 0 auto 10px auto;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--link-color), transparent);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { 
        transform: translateY(-100%);
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        transform: translateY(100%);
        opacity: 0;
    }
}

.scroll-text {
    font-size: 0.9rem;
    color: var(--muted-color);
}

/* Section Animations */
.reveal-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* News Grid */
.news-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--secondary-bg-color, rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.reveal-section.revealed .news-item {
    opacity: 1;
    transform: translateY(0);
}

.reveal-section.revealed .news-item:nth-child(1) { transition-delay: 0.05s; }
.reveal-section.revealed .news-item:nth-child(2) { transition-delay: 0.15s; }
.reveal-section.revealed .news-item:nth-child(3) { transition-delay: 0.25s; }
.reveal-section.revealed .news-item:nth-child(4) { transition-delay: 0.35s; }
.reveal-section.revealed .news-item:nth-child(5) { transition-delay: 0.45s; }
.reveal-section.revealed .news-item:nth-child(6) { transition-delay: 0.55s; }
.reveal-section.revealed .news-item:nth-child(7) { transition-delay: 0.65s; }
.reveal-section.revealed .news-item:nth-child(8) { transition-delay: 0.75s; }

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--link-color);
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .news-item {
        opacity: 1;
        transform: none;
        transition: box-shadow 0.3s ease, border-color 0.3s ease;
    }
}

.news-item.highlight-news {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(121, 192, 255, 0.05));
    border-color: var(--link-color);
}

.news-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-date {
    font-size: 0.9rem;
    color: var(--muted-color);
    font-weight: 500;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 5px 0;
}

.news-description {
    color: var(--text-color);
    line-height: 1.6;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        gap: 30px;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }
    
    .hero-roles {
        font-size: 0.9rem;
    }
    
    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-pic-hero {
        width: 250px;
        height: 250px;
    }
    
    .profile-flip-card {
        width: 250px;
        height: 250px;
    }
    
    /* Mobile 3D flip fix */
    .profile-container {
        -webkit-perspective: 1000px;
        perspective: 1000px;
    }
    
    .profile-flip-card {
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }
    
    .profile-flip-card-inner {
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }
    
    .profile-flip-card-front,
    .profile-flip-card-back {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .profile-flip-card-back {
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
    }
    
    .profile-container.flipped .profile-flip-card {
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
    }
    
    .news-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        margin-top: -20px;
        margin-bottom: 20px;
        padding: 40px 20px;
    }
    
    .hero-name {
        font-size: 2rem;
    }
    
    .cta-primary, .cta-secondary {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .profile-pic-hero {
        width: 200px;
        height: 200px;
    }
    
    .profile-flip-card {
        width: 200px;
        height: 200px;
    }
    
    /* Extra mobile 3D support */
    .profile-container {
        -webkit-perspective: 800px;
        perspective: 800px;
    }
}

/* Light theme adjustments */
[data-theme="light"] .hero-section {
    background: transparent;
}

[data-theme="light"] .news-item {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .news-item.highlight-news {
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.08), rgba(5, 80, 174, 0.04));
}

/* Dynamic Background for All Pages */
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--bg-color) 0%,
        rgba(88, 166, 255, 0.1) 25%,
        rgba(121, 192, 255, 0.05) 50%,
        var(--bg-color) 75%,
        rgba(26, 26, 46, 0.8) 100%
    );
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { 
        background: linear-gradient(
            135deg,
            var(--bg-color) 0%,
            rgba(88, 166, 255, 0.1) 25%,
            rgba(121, 192, 255, 0.05) 50%,
            var(--bg-color) 75%,
            rgba(26, 26, 46, 0.8) 100%
        );
    }
    50% { 
        background: linear-gradient(
            225deg,
            var(--bg-color) 0%,
            rgba(121, 192, 255, 0.15) 30%,
            rgba(88, 166, 255, 0.08) 60%,
            var(--bg-color) 80%,
            rgba(22, 33, 62, 0.9) 100%
        );
    }
}

.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Light theme background adjustments */
[data-theme="light"] .gradient-layer {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        rgba(9, 105, 218, 0.05) 25%,
        rgba(5, 80, 174, 0.03) 50%,
        #ffffff 75%,
        rgba(248, 250, 252, 0.9) 100%
    );
    animation: gradientShiftLight 8s ease-in-out infinite;
}

@keyframes gradientShiftLight {
    0%, 100% { 
        background: linear-gradient(
            135deg,
            #ffffff 0%,
            rgba(9, 105, 218, 0.05) 25%,
            rgba(5, 80, 174, 0.03) 50%,
            #ffffff 75%,
            rgba(248, 250, 252, 0.9) 100%
        );
    }
    50% { 
        background: linear-gradient(
            225deg,
            #ffffff 0%,
            rgba(5, 80, 174, 0.08) 30%,
            rgba(9, 105, 218, 0.04) 60%,
            #ffffff 80%,
            rgba(226, 232, 240, 0.95) 100%
        );
    }
}

/* Ensure content is above background */
.container {
    position: relative;
    z-index: 1;
}

/* Venue Badge */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 8px;
}

.badge.oral {
    background-color: rgba(88, 166, 255, 0.15);
    color: var(--link-color);
    border: 1px solid var(--link-color);
}

[data-theme="light"] .badge.oral {
    background-color: rgba(9, 105, 218, 0.1);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--muted-color);
    transition: color 0.3s ease, border-color 0.3s ease;
}

