:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --light-bg: #f5f6fa;
    --white: #ffffff;
    --max-width: 1200px;
    --nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 20px;
}

/* When scrolling up, nav will be fixed */
nav.floating {
    position: fixed;
    transform: translateY(0);
}

/* When scrolling down, hide the nav */
nav.hidden {
    position: fixed;
    transform: translateY(-100%);
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Language Toggle Button */
.lang-toggle {
    background: none;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: 1rem;
}

.lang-toggle:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .lang-toggle {
        position: absolute;
        right: 4rem;
        top: 1rem;
        z-index: 1001;
    }
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid transparent;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.menu-toggle:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 70vh;
    margin-top: var(--nav-height, 64px); /* Use CSS variable for nav height */
    min-height: calc(70vh - var(--nav-height, 64px)); /* Ensure full visibility */
    overflow: hidden;
}

.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1) blur(0.5px);
    transform: scale(1.05);
    transition: transform 10s ease-in-out;
}

.slide.active img {
    transform: scale(1.1);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(44, 62, 80, 0.8) 0%,
        rgba(44, 62, 80, 0.75) 100%
    );
    z-index: 2;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    position: relative;
    z-index: 3;
    height: 100%;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content .subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.hero-content .research-focus {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Sections */
section {
    padding: 5rem 0;
}

section:nth-child(even) {
    background-color: var(--light-bg);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

/* About Section */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.highlight-item {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.highlight-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    height: 100%;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.research-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.research-card h3:not(:first-child) {
    margin-top: 2.5rem;
}

.research-card ul {
    list-style-type: none;
    margin: 0 0 2rem 0;
    padding: 0;
}

.research-card li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
    padding-left: 1.2rem;
    position: relative;
    color: var(--text-color);
}

.research-card li::before {
    content: "▪";
    position: absolute;
    left: 0;
    font-size: 0.8em;
    color: var(--secondary-color);
}

.research-card li:last-child {
    margin-bottom: 0;
}

/* Education Section */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.education-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.education-card h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.education-date {
    color: var(--accent-color);
    font-weight: 500;
    margin: 0.5rem 0;
}

/* Publications Section Styling */
.section-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.scholar-link {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
}

.scholar-link i {
    margin-right: 0.5rem;
}

.scholar-link:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.publications-grid {
    max-width: 900px;
    margin: 0 auto;
}

.publication-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.publication-card h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.5rem;
}

.publication-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-bg);
}

.publication-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.publication-item h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.publication-title {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.publication-title:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.publication-item .journal {
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.publication-item .journal-name {
    color: var(--secondary-color);
    font-weight: 500;
    font-style: italic;
}

.publication-item .year {
    color: var(--text-color);
    opacity: 0.8;
}

.publication-item .authors {
    color: var(--text-color);
    margin: 0.2rem 0;
    font-size: 0.95rem;
    display: flex;
    opacity: 0.9;
}

.publication-item .status {
    display: flex;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.3rem;
}

.publication-item + .publication-item {
    margin-top: 2rem;
}

.publication-item i {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
    font-style: italic;
}

@media (max-width: 768px) {
    .publication-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .research-card h3 {
        font-size: 1.3rem;
    }

    .research-card li {
        font-size: 0.95rem;
    }
}

/* Contact Section */
#contact {
    padding: 4rem 0;
}

#contact .container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    text-align: center;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

#contact p {
    text-align: center;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    margin: 0;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.contact-info p:hover {
    transform: translateX(5px);
}

.contact-info i {
    color: var(--secondary-color);
    font-size: 1.3rem;
    width: 1.5rem;
    text-align: center;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

footer p {
    opacity: 0.9;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        --nav-height: 64px; /* Set nav height variable */
    }

    .nav-content {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        padding: 0.75rem 20px;
    }

    .logo {
        padding: 0 1.5rem;
        z-index: 2;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 1.2rem;
        top: 1rem;
        z-index: 2;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px; /* Position below fixed header */
        left: 0;
        width: 100%;
        padding: 1rem 1.5rem;
        background: var(--white);
        opacity: 0;
        transform: translateY(-10px);
        box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        gap: 0.5rem;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links a {
        display: block;
        padding: 0.5rem 0;
        text-align: left;
        font-size: 1.1rem;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .subtitle {
        font-size: 1.2rem;
    }

    section {
        padding: 3rem 0;
    }

    h2 {
        font-size: 2rem;
    }
}

/* Screen size specific hero heights */
@media (max-width: 480px) {
    .hero {
        height: 50vh;
    }
}

@media (min-width: 1921px) {
    .hero {
        height: 60vh;
        max-height: 800px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.8s ease-out;
}