@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    /* Light Mode Colors */
    --bg-color-light: #F7F8FC; /* User Pref: F7F8FC */
    --text-dark-light: #1a202c;
    --text-light-light: #4a5568;
    --card-bg-light: #ffffff;
    --header-bg-light: rgba(255, 255, 255, 0.8);
    --header-scrolled-bg-light: rgba(255, 255, 255, 0.95);

    /* Dark Mode Colors */
    --bg-color-dark: #000000;
    --text-dark-dark: #f5f5f5;
    --text-light-dark: #b0b0b0;
    --card-bg-dark: #0a0a0a;
    --header-bg-dark: rgba(0, 0, 0, 0.8);
    --header-scrolled-bg-dark: rgba(0, 0, 0, 0.96);
    
    /* Universal Accent */
    --primary-accent: #FFA500; /* User Pref: Primary Button */
    --secondary-accent: #1E90FF; /* User Pref: Secondary Button */
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* Applying the theme */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color-light);
    color: var(--text-dark-light);
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative; /* Stacking context for z-index */
}

a, button {
    cursor: pointer; /* Restore default cursor behavior */
}

.dark body {
    background-color: var(--bg-color-dark);
    color: var(--text-dark-dark);
}

/* Header Styling */
header {
    position: relative;
    overflow: clip;
    background-color: rgba(255, 255, 255, 0.2);
    transition: background-color 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

header::before,
header::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

header::before {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.1) 45%, rgba(14, 165, 233, 0.09)),
        radial-gradient(180px 55px at 10% 40%, rgba(255, 255, 255, 0.32), transparent 70%);
    opacity: 0.95;
}

header::after {
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.08));
    opacity: 0.85;
}

header nav {
    position: relative;
    z-index: 1;
}

.dark header {
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark header::before {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04) 55%, rgba(96, 165, 250, 0.14)),
        radial-gradient(210px 62px at 86% 50%, rgba(255, 255, 255, 0.15), transparent 72%);
    opacity: 0.76;
}

.dark header::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02));
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 28px -22px rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(18px) saturate(155%);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
}

.dark header.scrolled {
    background-color: rgba(0, 0, 0, 0.42);
    box-shadow: 0 14px 36px -24px rgba(0, 0, 0, 0.9);
}

/* Hero Section Styling */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    padding-bottom: 40px;
}

/* Particles JS global background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
}

.hero-content h1 {
    font-weight: 900;
    font-size: 3.5rem;
}

.dark .hero-content h1 {
    color: var(--text-dark-dark);
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 6rem;
    }
}

.typing-effect {
    font-size: 1.5rem;
    color: var(--text-light-light);
    font-weight: 500;
}

.dark .typing-effect {
    color: var(--text-light-dark);
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.5rem;
    background-color: var(--primary-accent);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* General Section Styling */
.section {
    padding: 6rem 1rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

h2.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-accent);
    border-radius: 2px;
}

/* Staggered Animation Items */
.animate-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.is-visible .animate-stagger {
    opacity: 1;
    transform: translateY(0);
}

/* Skill Card Hover */
.skill-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Project Section Styles */
.filter-btn {
    background-color: transparent;
    border: 2px solid #e2e8f0;
    color: var(--text-light-light);
    transition: all 0.3s ease;
}

.dark .filter-btn {
    border-color: #4a5568;
    color: var(--text-light-dark);
}

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

.filter-btn.active {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
    color: white;
    font-weight: 700;
}

.project-card {
    transition: opacity 0.4s ease-in-out;
}

.project-image-container {
    overflow: hidden;
    border-radius: 0.5rem;
}

.project-image-container img {
    transition: transform 0.4s ease;
}

.project-card:hover .project-image-container img {
    transform: scale(1.05);
}

/* Specific Styles for Research Cards */
.research-card {
    border-left: 4px solid var(--primary-accent);
}

.dark .research-card {
    background-color: rgba(45, 55, 72, 0.5);
}

/* ============================================ */
/* Compact Project Cards                        */
/* ============================================ */
.project-card-compact {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card-compact:hover {
    transform: translateY(-4px);
}

.project-card-compact .project-image-container img {
    transition: transform 0.4s ease;
}

.project-card-compact:hover .project-image-container img {
    transform: scale(1.05);
}

.dark .project-card-compact {
    background-color: rgba(30, 41, 59, 0.7);
}

/* ============================================ */
/* Publication Cards                            */
/* ============================================ */
.publication-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.dark .publication-card {
    background-color: rgba(30, 41, 59, 0.8);
}

/* ============================================ */
/* Experience Timeline                          */
/* ============================================ */
.experience-timeline {
    position: relative;
    padding-left: 2.5rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-accent), #6366f1, #8b5cf6);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.85rem;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.dark .timeline-dot {
    border-color: #1a202c;
}

.timeline-content {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.dark .timeline-content {
    background-color: rgba(30, 41, 59, 0.7);
}

/* ============================================ */
/* Leadership Cards                             */
/* ============================================ */
.leadership-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leadership-card:hover {
    transform: translateY(-3px);
}

.dark .leadership-card {
    background-color: rgba(30, 41, 59, 0.7);
}

/* ============================================ */
/* Responsive adjustments                       */
/* ============================================ */
@media (max-width: 768px) {
    .experience-timeline {
        padding-left: 2rem;
    }
    
    .timeline-dot {
        left: -1.6rem;
        width: 12px;
        height: 12px;
    }
}

/* ============================================ */
/* Image Carousels (Crossfade)                  */
/* ============================================ */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-slide:first-child {
    position: relative;
}

.carousel-slide.active {
    opacity: 1;
}

/* ============================================ */
/* Achievement Focus Cards                      */
/* ============================================ */
.achievement-focus {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-focus:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.dark .achievement-focus {
    background-color: rgba(30, 41, 59, 0.8);
}

/* ============================================ */
/* Event Image Collage                          */
/* ============================================ */
.event-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

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