/* Modern Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    /* Cyan accent */
    --secondary-color: #7928ca;
    /* Purple accent */
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --card-bg: #111111;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --bg-dark: #ffffff;
    --bg-darker: #f5f5f5;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --primary-color: #0077b6;
    /* Darker blue for better visibility on white */
    --secondary-color: #5a189a;
}


body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: 6rem 0;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

[data-theme="light"] #navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Blend the background image with the theme color */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('clinical_bg.png') no-repeat center center/cover;
    overflow: hidden;
}

[data-theme="light"] #hero {
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('clinical_bg.png') no-repeat center center/cover;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text-main);
    transform: rotate(15deg);
}

/* Typing Effect Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
    color: var(--primary-color);
}

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


.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7);
    /* Dark overlay to ensure text readability */
    z-index: 1;
    transition: var(--transition);
}

[data-theme="light"] .hero-overlay {
    background: rgba(255, 255, 255, 0.7);
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff 30%, #a0a0a0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -2px;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(45deg, #1a1a1a 30%, #555555 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats-item {
    text-align: center;
}

.hero-stats-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.hero-stats-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    z-index: 2;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}


/* Highlights Section */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: -8rem;
    /* Overlap with hero potentially, or just close gap */
    position: relative;
    z-index: 10;
}

.highlight-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    height: 100%;
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .highlight-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.highlight-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.highlight-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.highlight-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Common Section Header */
.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header .line {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-photo {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    display: block;
    object-fit: cover;
}

.about-photo:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition);
}

.skill-tag:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

[data-theme="light"] .skill-tag {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .timeline::before {
    background: rgba(0, 0, 0, 0.1);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-role {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.timeline-company {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-period {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: inline-block;
    font-style: italic;
}

.timeline-desc li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.timeline-desc li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Publications Section */
.publications-grid {
    display: grid;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.pub-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.pub-card:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.pub-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.pub-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    display: flex;
    gap: 1.5rem;
}

.text-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.text-link:hover {
    text-decoration: underline;
}

/* Contact/Footer */
.footer-section {
    background: linear-gradient(to top, var(--bg-darker), var(--bg-dark));
    padding-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-main);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-5px);
}

[data-theme="light"] .social-icon {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease-out;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease-out;
}

.fade-in {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: translate(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

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

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

    .nav-links {
        display: none;
    }

    /* Mobile menu simplified */
    .menu-toggle {
        display: block;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .pub-card:hover {
        transform: translateY(-5px);
    }
}