/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --accent-color: #2340E8;
    --text-color: #333333;
    --light-gray: #f8f9fa;
    --border-color: #e1e4e8;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d6fa5;
    text-decoration: underline;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    backdrop-filter: blur(5px);
}

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

.nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-logo:hover {
    text-decoration: none;
    color: var(--accent-color);
}

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

.nav-links a {
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Main Container */
.container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* About Section */
.about-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.about-text {
    flex: 1;
}

.about-text h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 1.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.2rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #555;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--light-gray);
    transition: all 0.2s;
}

.social-links a:hover {
    background-color: white;
    border-color: var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
}

.about-image {
    flex-shrink: 0;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Shared Item Styles (Education, Experience) */
.item {
    margin-bottom: 1.5rem;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.item-header h3 {
    font-size: 1.1rem;
    color: #222;
}

.date {
    font-size: 0.9rem;
    color: #777;
    white-space: nowrap;
}

.detail {
    font-size: 0.95rem;
    color: #555;
    font-style: italic;
}

ul {
    margin-left: 1.2rem;
    margin-top: 0.5rem;
}

li {
    margin-bottom: 0.3rem;
}

.more-link {
    font-weight: 600;
}

/* Awards */
.awards-list {
    list-style: none;
    margin-left: 0;
}

.awards-list li {
    display: grid;
    grid-template-columns: 280px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
}
.award-title {
    color: #111;
}
.award-event {
    color: #444;
}

.awards-list li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #777;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-section {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .item-header {
        flex-direction: column;
    }
    
    
    .awards-list li {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

/* Publication Filters */
.pub-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px;
    border: 1px solid var(--accent-color);
    background-color: transparent;
    color: var(--accent-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Publication Layout */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.publication {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 20px;
}

.publication:last-child {
    border-bottom: none;
}

.pub-media {
    width: 200px;
    flex-shrink: 0;
}

.media-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #eaeaea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.85rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pub-media img, .pub-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.pub-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pub-year {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 0;
}

.pub-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 5px;
    line-height: 1.4;
}

.pub-authors {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 4px;
}

.pub-venue {
    font-size: 0.85rem;
    color: #777;
    font-style: italic;
}

@media (max-width: 768px) {
    .publication {
        flex-direction: column;
        gap: 15px;
    }
    .pub-media {
        width: 100%;
        max-width: 300px;
    }
}

/* Section Title Row for inline links */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

h2.no-border {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.scholar-link {
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .section-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Fun Projects Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.gallery-card img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
    padding: 15px;
    padding-top: 30px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-card:hover .card-overlay {
    transform: translateY(0);
    opacity: 1;
}

.card-overlay h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
    border-bottom: none;
}

/* Modal styling */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    position: relative;
    animation: scaleUp 0.3s ease;
}

@keyframes scaleUp {
    from { transform: scale(0.95); }
    to { transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

#modal-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    max-height: 400px;
    object-fit: cover;
    background-color: var(--light-gray);
}

#modal-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
    border-bottom: none;
}

#modal-desc {
    color: #444;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Selected Works */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 3rem;
}

.work-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.work-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.work-img {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    margin-bottom: 16px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
}

.work-img img, .work-img video {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.work-card:hover .work-img img,
.work-card:hover .work-img video {
    transform: scale(1.05);
}

.work-info {
    padding: 4px 8px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.work-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    letter-spacing: -0.3px;
}

.work-question {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.work-tags {
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.work-tags::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #48bb78;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(72, 187, 120, 0.6);
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
}

:root {
    --slider-pos: 0%;
}

/* Interactive Timeline with Slider */
.timeline-container {
    display: flex;
    gap: 40px;
    margin: 40px 0;
    align-items: flex-start;
}

.timeline-nav.slider-mode {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    width: 170px;
    flex-shrink: 0;
    height: 320px;
    margin-top: 20px;
}

.slider-track {
    position: absolute;
    right: 0px;
    top: 20px;
    bottom: 20px;
    width: 14px;
    background: #e9ecef;
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
}

.slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #111;
    border-radius: 10px;
    height: var(--slider-pos);
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-thumb {
    position: absolute;
    top: var(--slider-pos);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: #111;
    border-radius: 50%;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.thumb-inner {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 40px;
    padding-right: 25px;
    cursor: pointer;
    z-index: 3;
}

.nav-item .nav-text {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: #adb5bd;
    transition: 0.3s;
}

.nav-item.active .nav-text {
    color: #111;
    transform: scale(1.05);
    transform-origin: left center;
}

.timeline-content {
    flex: 1;
    position: relative;
}

.tl-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tl-panel.active {
    display: block;
}

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

@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .timeline-nav.slider-mode {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        padding-bottom: 30px;
        margin-bottom: 20px;
        border-bottom: none;
        margin-top: 0;
    }
    
    .slider-track {
        right: 20px;
        left: 20px;
        top: auto;
        bottom: 5px;
        width: auto;
        height: 14px;
    }
    
    .slider-fill {
        height: 100%;
        width: var(--slider-pos);
        transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }
    
    .slider-thumb {
        top: 50%;
        left: var(--slider-pos);
        transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .nav-item {
        padding-right: 0;
        justify-content: center;
        flex: 1;
        text-align: center;
    }

    .nav-item .nav-text {
        font-size: 1rem;
    }
    
    .nav-item.active .nav-text {
        transform: scale(1.05);
        transform-origin: center bottom;
    }
}

/* Timeline style inside panels */
.item.tl-layout {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
}

.item-date {
    font-weight: 700;
    font-size: 1rem;
    color: #2340E8; /* distinct accent color for date */
    min-width: 145px;
    flex-shrink: 0;
    padding-top: 1px;
}

.item-content {
    flex: 1;
    max-width: 750px;
}

.item-content .item-header {
    flex-direction: column;
    margin-bottom: 2px;
}

.item-content .item-header h3 {
    font-size: 1.05rem;
    color: #111;
    margin-bottom: 0;
}

.item-content p {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 4px;
}

.item-content p .detail,
.item-content .detail {
    font-style: italic;
    color: #666;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 2px;
}

.item-content ul {
    margin-top: 5px;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #444;
    padding-left: 20px;
}

.item-content li {
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .item.tl-layout {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px;
    }
    
    .item-date {
        min-width: auto;
        font-size: 0.95rem;
        padding-top: 0;
    }
}

/* Publication Badges */
.pub-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 8px;
    line-height: 1.3;
}

.badge-journal {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.badge-conference {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.badge-poster {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

/* Leadership Single-line Layout */
#leadership-inner .item-content {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    max-width: 100%; /* allow full stretch for the right-aligned role */
}

#leadership-inner .item-header {
    margin-bottom: 0;
}

#leadership-inner .item-header h3 {
    margin-bottom: 0;
}

#leadership-inner p {
    margin: 0;
    margin-left: 20px;
    color: #555;
    white-space: nowrap;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    #leadership-inner .item-content {
        flex-direction: column;
        align-items: flex-start;
    }
    #leadership-inner p {
        margin-left: 0;
        margin-top: 3px;
    }
}

/* Awards Toggle System */
#awards:not(.expanded) .hidden-award {
    display: none !important;
}

/* Vision Modal Specific Styles */
.vision-modal-content {
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-vision-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.close-vision-btn:hover {
    color: #000;
}

.vision-modal-layout {
    display: flex;
    height: 100%;
}

.vision-modal-media {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eaeaea;
}

.vision-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 1.2rem;
    min-height: 400px;
}

.vision-modal-info {
    flex: 1.2;
    padding: 40px;
    overflow-y: auto;
    max-height: 85vh;
}

.vision-modal-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #111;
}

.vision-question {
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.4;
}

.vision-sections {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.v-section h5 {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-section p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    margin: 0;
}

.links-section {
    flex-direction: row !important;
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.v-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f1f3f5;
    color: #333;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.v-link:hover {
    background: #e2e6ea;
}

@media (max-width: 768px) {
    .vision-modal-layout {
        flex-direction: column;
    }
    .vision-modal-media {
        min-height: 250px;
    }
    .vision-modal-info {
        padding: 25px;
    }
}

/* Clean Awards Category Label */
.award-category-clean {
    margin-bottom: 25px;
}

.cat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-top: 10px;
    padding-left: 5px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    width: 100%;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
}

/* Force about-image to be flex column for social links */
.about-section .about-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Make icon-only buttons perfectly square */
.social-links a:not(.cv-link) {
    padding: 10px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.social-links a.cv-link {
    padding: 10px 18px;
    height: 40px;
    border-radius: 8px;
}

/* Publication Links */
.pub-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pub-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Remove background boxes from social icons */
.social-links a, .social-links a:not(.cv-link), .social-links a.cv-link {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}
.social-links a:hover {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 0.7;
}

/* Push the overlay up slightly to accommodate the year text in Fun Projects */
#fun .card-overlay {
    bottom: 30px;
}

/* Override social links for larger icons and smaller gaps */
.social-links {
    gap: 8px !important;
}
.social-links a, .social-links a:not(.cv-link), .social-links a.cv-link {
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* Override awards-list li for single line compact layout */
.awards-list li {
    display: block !important;
    padding: 0.25rem 0 !important;
    font-size: 0.95rem;
    color: #444;
}

/* Align Skills list columns */
#skills-inner .item-date {
    min-width: 200px;
}

/* Card Section Layout */
.card-section-container {
    border: 1px solid #eaeaea;
    border-radius: 24px;
    padding: 24px 28px;
    background: #ffffff;
    margin-bottom: 3rem;
}
.card-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.card-section-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 !important;
    border: none !important;
    padding-bottom: 0 !important;
}
.more-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.more-btn:hover {
    background: #f0f0f0;
    color: #333;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.info-card {
    background: #F7F7F7;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.info-card-icon {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.info-card-icon svg {
    width: 22px !important;
    height: 22px !important;
}
.info-card-org {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0 0 3px 0;
    line-height: 1.3;
}
.info-card-role {
    font-size: 13px;
    font-weight: 400;
    color: #555;
    margin: 0 0 10px 0;
}
.info-card-date {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #2340E8 !important;
    margin: 0;
    margin-top: auto;
}
.hidden-card {
    display: none !important;
}
.hidden-card.show {
    display: flex !important;
}

/* Horizontal Scroll Grid */
.horizontal-scroll-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}
.horizontal-scroll-grid::-webkit-scrollbar {
    height: 6px;
}
.horizontal-scroll-grid::-webkit-scrollbar-track {
    background: #f7f7f7;
    border-radius: 4px;
}
.horizontal-scroll-grid::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}
.horizontal-scroll-grid::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}
.horizontal-scroll-grid .info-card {
    flex: 0 0 165px;
    scroll-snap-align: start;
}


/* Dreamy Card Section Container */
.card-section-container {
    background-color: #f7f9fc;
    background-image: 
        radial-gradient(circle at 10% 0%, rgba(220, 235, 255, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(235, 225, 255, 0.6) 0%, transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(215, 245, 250, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 20% 90%, rgba(250, 235, 245, 0.5) 0%, transparent 50%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), inset 0 0 20px rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 24px 28px;
    margin-bottom: 3rem;
}

/* Glassmorphism Cards */
.info-card {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(31, 38, 135, 0.05);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(31, 38, 135, 0.08);
    background: rgba(255, 255, 255, 0.75) !important;
}

/* Update Scrollbar for dreamy background */
.horizontal-scroll-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.4) !important;
    border-radius: 4px;
}
.horizontal-scroll-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 4px;
}
.horizontal-scroll-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}


/* Global Dreamy Background */
body {
    background-color: #f7f9fc !important;
    background-image: 
        radial-gradient(circle at 10% 0%, rgba(220, 235, 255, 0.7) 0%, transparent 55%),
        radial-gradient(circle at 90% 20%, rgba(235, 225, 255, 0.7) 0%, transparent 45%),
        radial-gradient(circle at 80% 100%, rgba(215, 245, 250, 0.6) 0%, transparent 55%),
        radial-gradient(circle at 20% 90%, rgba(250, 235, 245, 0.6) 0%, transparent 55%) !important;
    background-attachment: fixed !important;
    background-size: cover !important;
}

/* Make Navbar Glassy */
.navbar {
    background-color: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(12px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.2) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* Adjust Card Section Container */
.card-section-container {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(20px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03), inset 0 0 20px rgba(255, 255, 255, 0.3) !important;
}


/* Make Work Cards Glassy */
.work-card {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(16px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04) !important;
}

/* Make Modals Glassy too */
.modal-content {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(24px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1) !important;
}


/* Vibrant Blue Main Colors */
:root {
    --vibrant-blue: #2340E8;
    --soft-purple-bg: #E4E8FA;
}

h1, h2, .card-section-title, .about-text h1, .about-text h2 {
    color: var(--vibrant-blue) !important;
}

/* Skill Tags Layout */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.skill-tag {
    background: var(--soft-purple-bg);
    color: var(--vibrant-blue);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}


/* Two Column Layout for Edu and Exp */
.two-column-section {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 60px;
    margin-bottom: 3rem;
}
@media (max-width: 800px) {
    .two-column-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
.stacked-item {
    margin-bottom: 1.8rem;
}
.stacked-date {
    font-size: 14px;
    font-weight: 700;
    color: var(--vibrant-blue);
    margin-bottom: 2px;
}
.stacked-org {
    font-size: 16px !important;
    font-weight: 700;
    color: #111 !important;
    margin: 0 0 2px 0;
}
.stacked-role {
    font-size: 15px;
    color: #444;
    margin: 0 0 2px 0;
}
.stacked-detail {
    font-size: 14px;
    color: #777;
    margin: 0;
}
.stacked-list {
    margin: 4px 0 0 0;
    padding-left: 20px;
    font-size: 14.5px;
    color: #555;
    list-style-type: disc;
}
.stacked-list li {
    margin-bottom: 2px;
}


.stacked-date-inline {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--vibrant-blue);
    margin-left: 6px;
    letter-spacing: 0.5px;
}


/* Compact Three Column Layout (Academic Services Style) */
.compact-services-section {
    padding: 0 !important;
    margin-bottom: 3.5rem;
}
.compact-three-col-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    align-items: start;
}
@media (max-width: 850px) {
    .compact-three-col-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}
.compact-col-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111 !important;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.08);
}
.compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.compact-list-item {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 9px;
    color: #444;
}
.compact-list-item:last-child {
    margin-bottom: 0;
}
.compact-list-item strong {
    font-weight: 600;
    color: #111;
}
.compact-item-name {
    display: inline;
}
.compact-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--vibrant-blue);
    white-space: nowrap;
    margin-left: 6px;
}
.skill-item {
    margin-bottom: 11px;
}
.skill-detail {
    font-size: 0.82rem;
    color: #666;
    margin-top: 1px;
}

/* News Section Styles */
.news-summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.news-summary-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-size: 0.95rem;
    line-height: 1.55;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.news-summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.news-summary-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--vibrant-blue);
    min-width: 65px;
    flex-shrink: 0;
}
.news-summary-text {
    color: #333;
}

/* News Page Specific Styles */
.news-page-header {
    margin-bottom: 2rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--vibrant-blue);
    margin-bottom: 16px;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.back-link:hover {
    transform: translateX(-3px);
}
.page-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--vibrant-blue);
    margin-bottom: 8px;
}
.page-subtitle {
    font-size: 1.05rem;
    color: #555;
}
.news-year-group {
    margin-bottom: 2.5rem;
}
.news-year-group:last-child {
    margin-bottom: 0;
}
.news-year-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111 !important;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}
.news-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: background 0.2s ease, transform 0.2s ease;
}
.news-card:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateX(4px);
}
.news-card-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--vibrant-blue);
    min-width: 65px;
    flex-shrink: 0;
    padding-top: 2px;
}
.news-card-content {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.news-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.tag-visit { background: #E0E7FF; color: #4338CA; }
.tag-paper { background: #DBEAFE; color: #1D4ED8; }
.tag-award { background: #FEF3C7; color: #B45309; }
.tag-service { background: #F3E8FF; color: #7E22CE; }
.tag-academic { background: #DCFCE7; color: #15803D; }
.news-title {
    margin: 0;
    font-size: 0.95rem;
    color: #222;
    line-height: 1.5;
}


/* Dates on Left for Compact 3-Column Items */
.compact-list-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 9px;
    color: #444;
}
.compact-list-item.skill-item {
    display: block;
    margin-bottom: 12px;
}
#leadership .compact-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--vibrant-blue);
    min-width: 78px;
    flex-shrink: 0;
    margin-left: 0 !important;
}
#teaching .compact-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--vibrant-blue);
    min-width: 24px;
    flex-shrink: 0;
    margin-left: 0 !important;
}


/* 2-Column Balanced Grid for Leadership & Skills/Teaching */
.compact-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 800px) {
    .compact-two-col-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
#leadership .compact-date {
    min-width: 95px !important;
}
#teaching .compact-date {
    min-width: 42px !important;
}


/* Single line for Skill Categories and Details */
.compact-list-item.skill-item {
    display: flex !important;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 9px;
}
.skill-category {
    min-width: 145px;
    flex-shrink: 0;
    color: #111;
}
.skill-detail {
    font-size: 0.86rem;
    color: #555;
    margin-top: 0 !important;
}
@media (max-width: 550px) {
    .compact-list-item.skill-item {
        flex-direction: column;
        gap: 2px;
    }
    .skill-category {
        min-width: unset;
    }
}


/* Award Badges for Publications */
.badge-award-best,
.badge-award-honorable {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #B45309 !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    margin-left: 8px;
    line-height: 1.3;
}

.pub-award-highlight {
    font-size: 0.95rem;
    font-weight: 700;
    color: #b45309;
    margin: 4px 0 5px 0;
    line-height: 1.4;
    letter-spacing: 0.15px;
}

/* Subtle, refined external links for authors, advisors, labs & community */
.pub-authors a,
.stacked-detail a,
.stacked-role a,
.stacked-org a,
.about-text em a,
.compact-item-name a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 2.5px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.pub-authors a:hover,
.stacked-detail a:hover,
.stacked-role a:hover,
.stacked-org a:hover,
.about-text em a:hover,
.compact-item-name a:hover {
    color: var(--accent-color);
    text-decoration-color: var(--accent-color);
}


.stacked-desc {
    font-size: 14px;
    color: #555;
    margin: 3px 0 0 0;
    line-height: 1.45;
}


.stacked-desc-inline {
    color: #666;
    font-size: 13.5px;
    font-weight: 400;
}
.stacked-desc {
    font-size: 13.5px !important;
    color: #666 !important;
    margin: 3px 0 0 0;
    line-height: 1.45;
    font-weight: 400 !important;
}


/* Unified Date Styles for Education & Research Experience */
.stacked-date-sep {
    color: #cbd5e1;
    font-weight: 400;
    margin: 0 6px;
    font-size: 0.85rem;
}
.stacked-date-inline {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--vibrant-blue) !important;
    letter-spacing: normal !important;
    font-family: var(--font-family) !important;
}


/* Blue titles for Leadership, Skills, and Teaching */
.compact-col-title {
    color: var(--vibrant-blue) !important;
}


/* Subgroup titles for Awards */
.award-subgroup-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vibrant-blue) !important;
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.08);
}
.award-date {
    color: var(--vibrant-blue);
    font-weight: 700;
    font-size: 0.85rem;
}


/* Category Badges for Other Awards */
.award-cat-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}
.cat-app {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}
.cat-xr {
    background: #faf5ff;
    color: #7c3aed;
    border: 1px solid #f3e8ff;
}
.cat-hw {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}
.cat-inno {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}


/* Category Badges on Left with uniform column alignment */
.award-cat-tag {
    display: inline-block !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    padding: 1px 7px !important;
    border-radius: 6px !important;
    margin-right: 10px !important;
    margin-left: 0 !important;
    min-width: 66px !important;
    text-align: center !important;
    vertical-align: middle !important;
    letter-spacing: 0.3px !important;
}
