/* Reset and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap');

:root {
    --primary-color: #e84393;
    --primary-color-light: #fbeaf4;
    --secondary-color: #6c757d; /* Kept for potential subtle use */
    --background-color: #FFFFFF; /* White background */
    --light-gray-bg: #F8F9FA; /* Very light gray for subtle section contrast */
    --text-color: #333333; /* Dark gray text */
    --heading-color: #111111; /* Slightly darker for headings */
    --border-color: #f7d9ea;
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Inter', sans-serif;
    --nav-height: 68px;
    --font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: #222831;
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 3rem; font-weight: 700; margin-bottom: 2rem; }
h2 { font-size: 2.25rem; font-weight: 600; margin-bottom: 2.5rem; text-align: center; }
h3 { font-size: 1.75rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 500; }

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

a:hover {
    color: #3a7bc8; /* Darker shade on hover */
}

p {
    margin-bottom: 1.5rem;
}

ul,
ol {
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

/* Card style for Markdown lists (publications/news) */
#news-list-container ul, #publications-content-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#news-list-container ul {
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    position: static;
    overflow-y: auto;
    max-height: 240px;
    transition: none;
    scrollbar-width: thin;
    scrollbar-color: #e84393 #f6f9fb;
}
#news-list-container ul::-webkit-scrollbar {
    width: 7px;
    background: #f6f9fb;
    border-radius: 6px;
}
#news-list-container ul::-webkit-scrollbar-thumb {
    background: #e84393;
    border-radius: 6px;
}
#news-list-container ul li {
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    position: static;
    overflow: visible;
    transition: none;
}
#news-list-container ul li {
    margin-bottom: 0.7em;
    padding: 0 0 0 0.9em;
    color: #23272f;
    line-height: 1.6;
    border-left: 3px solid #e84393;
    position: relative;
}
#news-list-container ul li::before {
    content: '';
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    background: #e84393;
    border-radius: 50%;
    position: absolute;
    left: -0.7em;
    top: 0.7em;
}
#news-list-container ul li:hover {
    background: none;
    border: none;
    color: var(--primary-color);
    box-shadow: none;
}
#news-list-container ul li::before {
    display: none;
}


li {
    margin-bottom: 0.5rem;
}

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

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

section {
    padding: 100px 0;
    position: relative;
}
section:not(:last-of-type)::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    opacity: 0.7;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 20px rgba(0,0,0,0.07), 0 2px 5px rgba(0,0,0,0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
    padding: 0 20px; /* Padding inside nav container */
    max-width: 1100px;
    margin: 0 auto;
}

.logo a {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
    letter-spacing: 0.5px;
    transition: color 0.3s, text-shadow 0.3s;
}
.logo a:hover {
    color: var(--primary-color);
    text-shadow: 0 2px 8px rgba(74,144,226,0.08);
}

.nav-links a {
    margin-left: 30px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding-bottom: 5px;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Hide by default */
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--heading-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Profile Intro Section */
.profile-intro {
    padding-top: calc(var(--nav-height) + 70px);
    padding-bottom: 70px;
    background: linear-gradient(120deg, #eaf3fa 40%, #f8f9fa 100%);
    min-height: 50vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.profile-intro::before {
    content: '';
    position: absolute;
    left: -50px; top: -60px;
    width: 260px; height: 260px;
    background: radial-gradient(circle at 60% 40%, #e84393 0%, transparent 70%);
    opacity: 0.09;
    z-index: 0;
}
.profile-content, .bio, .profile-image { position: relative; z-index: 1; }

.profile-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.profile-image {
    flex-shrink: 0;
    width: 250px; /* Adjust size as needed */
    height: 250px;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Circular image */
    border: 5px solid var(--background-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bio {
    flex-grow: 1;
}

.bio h1 {
    font-size: 2.75rem; /* Slightly smaller than old hero */
    margin-bottom: 0.5rem;
    text-align: left; /* Override centered h1/h2 */
}

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

.bio a {
color: var(--primary-color);
text-decoration: underline;
transition: color 0.18s;
}
.bio a:hover {
color: #e84393;
}

.bio .highlight {
color: #e84393;
font-weight: 600;
    font-weight: 600;
}

/* News Section */
.news {
    background-color: var(--background-color); /* White background */
}

.news .container {
     max-width: 800px;
}

.news h2 {
     margin-bottom: 3rem;
}

.news-list {
    list-style: none;
    padding-left: 0;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 8px;
}

/* Experience Cards Layout */
.experience-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-top: 40px;
    margin-bottom: 40px;
}
@media (max-width: 900px) {
    .experience-cards { grid-template-columns: 1fr; }
}

.experience-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(74,144,226,0.08), 0 1.5px 0 #e0e0e0;
    padding: 32px 28px 24px 28px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.22s, transform 0.22s;
    border: 1.5px solid var(--border-color);
    position: relative;
    min-height: 210px;
}
.experience-card:hover {
    box-shadow: 0 8px 36px rgba(74,144,226,0.18);
    transform: translateY(-6px) scale(1.016);
    border-color: #e84393;
    z-index: 2;
}

.exp-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 18px;
}
.exp-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(74,144,226,0.06);
    margin-right: 6px;
}
.exp-logo-mini {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #e84393;
    background: #f8f9fa;
    border-radius: 50%;
    margin-right: 10px;
}
.exp-company {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 10px;
    display: inline-block;
}
.exp-location {
    color: #888;
    font-size: 0.98rem;
    margin-right: 10px;
    display: inline-block;
}
.exp-dates {
    color: #aaa;
    font-size: 0.95rem;
    display: block;
    margin-top: 2px;
}
.exp-bullets {
    margin: 0 0 0 0;
    padding-left: 18px;
    font-size: 1.08rem;
    color: #333;
}
.exp-bullets li {
    margin-bottom: 0.45em;
    line-height: 1.6;
}
.exp-previous {
    opacity: 0.93;
    background: linear-gradient(90deg, #f8f9fa 60%, #eaf3fa 100%);
    border-style: dashed;
}

/* Content Page (Experience, Publications) */
.content-page {
    padding-top: calc(var(--nav-height) + 80px); /* Add padding below header */
    padding-bottom: 80px;
    min-height: calc(100vh - 80px); /* Ensure footer is pushed down */
}

.content-page .container {
    max-width: 850px;
}

#markdown-content h2, 
#markdown-content h3,
#markdown-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

#markdown-content h2 {
    text-align: left; /* Override centered style */
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

#markdown-content h3 {
    font-size: 1.6rem;
}

#markdown-content h4 {
    font-size: 1.2rem;
    font-weight: 500;
}

#markdown-content ul {
    list-style: disc;
    padding-left: 25px;
}

#markdown-content hr {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 2.5rem 0;
}

/* Footer */
footer {
    background-color: var(--light-gray-bg);
    color: #6c757d;
    text-align: center;
    padding: 30px 0 10px 0;
    margin-top: auto;
    font-size: 0.98rem;
    border-top: 1.5px solid var(--border-color);
    position: relative;
}
.footer-socials {
    margin-bottom: 10px;
}
.footer-socials a {
    display: inline-block;
    margin: 0 10px;
    color: #6c757d;
    font-size: 1.35rem;
    transition: color 0.2s, transform 0.25s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.footer-socials a:hover {
    color: var(--primary-color);
    transform: scale(1.18) rotate(-6deg);
}
.footer-socials a:active {
    transform: scale(0.92) rotate(2deg);
}

/* Responsive Design */
/* Remove default fade-in for all main sections (will be JS-triggered) */
section, .content-page {
    opacity: 1;
    transform: none;
}

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(.4,0,.2,1), transform 0.9s cubic-bezier(.4,0,.2,1);
}
.fade-in.visible {
    opacity: 1;
    transform: none;
}

.slide-in {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.9s cubic-bezier(.4,0,.2,1), transform 0.9s cubic-bezier(.4,0,.2,1);
}
.slide-in.visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.1rem; }

    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 15px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 15px 0;
        display: block;
        padding-bottom: 10px;
    }

    .nav-links a::after {
        bottom: 5px; /* Adjust underline position */
    }

    /* Adjust Profile Intro for mobile */
    .profile-intro {
        padding-top: calc(var(--nav-height) + 40px);
        padding-bottom: 40px;
        text-align: center;
    }

    .profile-content {
        flex-direction: column; /* Stack image and bio */
        gap: 30px;
    }

    .profile-image {
        width: 200px;
        height: 200px;
        margin: 0 auto 20px auto; /* Center image */
    }

    .bio h1 {
        font-size: 2.25rem;
        text-align: center; /* Center title */
    }

    .bio .subtitle {
        font-size: 1.1rem;
    }
}
