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

/* Performance Optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-size: 16px;
}

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

/* ===== Navigation ===== */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
}

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

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero-section {
    margin-top: 80px;
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.image-border {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    z-index: 1;
}

/* ===== Section Styles ===== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* ===== About & Research Split Section ===== */
.about-research-section {
    background-color: var(--bg-white);
}

.split-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 3rem;
}

.about-content-main {
    padding-right: 2rem;
}

.section-header-left {
    text-align: left;
    margin-bottom: 2rem;
}

.section-header-left .section-title {
    font-size: 2.5rem;
}

.section-title-small {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: justify;
}

.about-text strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Research Sidebar */
.research-sidebar {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.research-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.research-icon-small {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.research-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.research-text p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ===== News Banner (One-liner) ===== */
.news-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.2rem 0;
    overflow: hidden;
}

.news-ticker {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: white;
}

.news-ticker i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.news-items-scroll {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.news-items-scroll::-webkit-scrollbar {
    display: none;
}

.news-highlight {
    font-weight: 700;
    color: #ffd700;
}

.news-separator {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* ===== Publications Section ===== */
.publications-section {
    background-color: var(--bg-white);
}

.publications-list {
    max-width: 1000px;
    margin: 0 auto;
}

.pub-item {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.pub-item:hover {
    box-shadow: var(--shadow-md);
}

.pub-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pub-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.pub-authors {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.pub-venue {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.pub-description {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: var(--bg-white);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.pub-link:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.pub-abstract {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
}

.pub-abstract.active {
    display: block;
}

.pub-abstract p {
    color: var(--text-dark);
    line-height: 1.8;
}


/* ===== Experience Section ===== */
.experience-section {
    background-color: var(--bg-white);
}

/* ===== Education Section ===== */
.education-section {
    background-color: var(--bg-light);
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-section {
    margin-bottom: 4rem;
}

.timeline-header {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 70px;
    bottom: -25px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item:last-child::before {
    display: none;
}

/* Timeline Logo Styles */
.timeline-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.timeline-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.timeline-logo.academic {
    border-color: var(--secondary-color);
}

/* Placeholder logo for companies without logos */
.placeholder-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.timeline-marker {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.timeline-marker.academic {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.timeline-content {
    flex: 1;
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.timeline-date {
    display: inline-block;
    background-color: var(--bg-light);
    color: var(--secondary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.timeline-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-company {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.timeline-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timeline-description {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== Contact Section ===== */
.contact-section {
    background-color: var(--bg-white);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 300px;
    cursor: pointer;
}

.contact-method:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contact-method i {
    font-size: 1.5rem;
}

/* Email Obfuscation */
.obfuscated-email {
    font-family: 'Courier New', monospace;
    user-select: none;
    transition: all 0.3s ease;
}

.email-link:hover .obfuscated-email {
    user-select: text;
}

.obfuscated-email::selection {
    background-color: var(--secondary-color);
    color: white;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-content-main {
        padding-right: 0;
    }

    .research-sidebar {
        order: 2;
    }

    .timeline-item {
        gap: 1rem;
    }

    .timeline-logo {
        width: 50px;
        height: 50px;
    }

    .timeline-item::before {
        left: 25px;
    }

}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .pub-item {
        padding: 1.5rem;
    }

    .pub-title {
        font-size: 1.2rem;
    }

    .timeline-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .image-wrapper {
        width: 200px;
        height: 200px;
    }

    .contact-method {
        min-width: 250px;
        padding: 0.8rem 1.5rem;
    }
}

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

.hero-content,
.research-card,
.pub-item,
.timeline-item {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Selection ===== */
::selection {
    background-color: var(--secondary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--secondary-color);
    color: white;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
