/* Global Reset & Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: white; /* Changed to white to prevent blue overflow */
    min-height: 100vh;
}

/* Container for content width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: #1a202c; /* Solid dark color */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Navigation Bar Styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    overflow: hidden;
}

/* Logo Styles */
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

/* Group for navigation links and language buttons */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    overflow: hidden;
}

/* Navigation Links Styles */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    color: #f39c12;
}

/* Main Content Area */
main {
    margin-top: 0; /* Remove gap between header and hero */
    background: white; /* Ensure main content has white background */
}

/* Hero Section Styles */
.hero {
    text-align: center;
    padding: 4rem 0 6rem;
    color: white;
    background: url('../images/hero-background.jpg') center/cover;
    background-attachment: fixed;
    position: relative;
    margin-top: 0; /* Remove gap */
    padding-top: 80px; /* Account for header height */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Profile Image Styles */
.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

/* Hero Text Styles */
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Call to Action Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Language button styling */
.btn-language {
    background: none;
    color: white;
    border: 1px solid white;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 5px;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-left: 0.5rem; /* Small margin between buttons */
}

.btn-language:hover {
    opacity: 1;
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.btn-language.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Section Styles */
.section {
    padding: 5rem 0;
    background: white;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* Skills Grid Styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-card h3 {
    color: #e74c3c;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Research Grid Styles */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.research-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.research-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.research-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.research-card-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1.5rem;
}

.research-card-content {
    background: white;
}

.research-card-body {
    padding: 2rem;
}

.research-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.research-year {
    opacity: 0.8;
    font-size: 0.9rem;
}

.doi-link {
    display: inline-block;
    margin-top: 1rem;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

.doi-link:hover {
    color: #c0392b;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap; /* Add this for wrapping on all screens */
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Footer Styles */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Quantum Animation (Background Element) */
.quantum-animation {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    opacity: 0.1;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

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

    /* Hide nav links on small screens, keep language buttons */
    .nav-links {
        display: none;
    }

    /* Adjust language buttons for mobile if needed */
    .language-buttons {
        margin-left: auto; /* Push to right if nav-links are hidden */
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Mobile social links */
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .social-link {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Particle Animation (Background Element) */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

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

/* Timeline-specific styles from the user's code */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background-color: #e2e8f0; /* Tailwind gray-200 */
}

.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    margin-bottom: 2.5rem; /* Equivalent to mb-10 */
}

.timeline-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: -10px;
    width: 22px;
    height: 22px;
    background-color: #3b82f6; /* Tailwind blue-500 */
    border: 4px solid #ffffff;
    border-radius: 9999px; /* Tailwind rounded-full */
    top: -2px; /* Adjust to align with the top of the timeline item */
    box-shadow: 0 0 0 4px #dbeafe; /* Tailwind ring-4 ring-blue-100 */
}

.timeline-item ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.timeline-item li {
    margin-bottom: 0.25rem;
}

@media (max-width: 640px) {
    .timeline {
        padding-left: 20px;
    }
}

#loading-indicator {
    text-align: center;
    padding: 20px;
    font-size: 1.2rem;
    color: #667eea;
}
