:root {
    --bg-color: #0f0f16;
    --text-color: #e0e0e0;
    --text-muted: #a0a0b0;
    --primary-color: #7c73ff;
    --primary-glow: rgba(124, 115, 255, 0.4);
    --secondary-color: #00d4ff;
    --accent-color: #ff007a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(15, 15, 22, 0.8);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(124, 115, 255, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 25%);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Light Mode Variables */
body.light-mode {
    --bg-color: #f0f2f5;
    --text-color: #2d2d35;
    --text-muted: #555560;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(240, 242, 245, 0.8);
    --primary-glow: rgba(124, 115, 255, 0.2);
}

body.light-mode .hero h1 {
    background: linear-gradient(135deg, #4a4a55 0%, #6c63ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .timeline-content h3,
body.light-mode .company-header h3,
body.light-mode .role-item h4,
body.light-mode .publication-card h3 {
    color: #2d2d35;
}

/* Profile Image */
.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
    margin-bottom: 25px;
    transition: var(--transition);
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px;
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333344;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 20px 0;
    border-bottom: 1px solid var(--card-border);
}

.navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 40px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 30px;
    border-radius: 50px;
    border: 1px solid var(--card-border);
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.7;
    position: relative;
}

.nav-links a:hover {
    color: #fff;
    opacity: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 140px;
    position: relative;
    overflow: hidden;
}

/* Dynamic Background Orbs */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 115, 255, 0.15) 0%, transparent 70%);
    filter: blur(50px);
    z-index: -1;
    animation: pulse 8s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.0rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #a5a0ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero h2 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.0rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.8;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 50px;
}

.social-links a {
    font-size: 1.6rem;
    color: var(--text-color);
    opacity: 0.7;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: translateY(-5px);
    text-shadow: 0 0 15px var(--primary-glow);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #5a52d5);
    color: #fff;
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(108, 99, 255, 0.3);
    filter: brightness(1.1);
}

/* Sections */
.section {
    padding: 120px 0;
}

/* About */
.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-muted);
}

.about-text p {
    margin-bottom: 25px;
}

/* Timeline/Education */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--card-border), transparent);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    width: 50%;
    padding: 0 50px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
    z-index: 1;
    transition: var(--transition);
}

.timeline-item:hover::after {
    background: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-date {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #fff;
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 80px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 20px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Enhanced Cards */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.publication-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.publication-card:hover {
    transform: translateY(-10px);
    border-color: rgba(124, 115, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.publication-card:hover::before {
    opacity: 1;
}

.publication-card h3 {
    font-size: 1.35rem !important;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #fff;
    font-weight: 600;
}

.authors {
    font-size: 0.85rem !important;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.venue {
    font-size: 0.85rem !important;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.publication-description {
    font-size: 0.9rem !important;
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--text-muted);
}

.card-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.card-links a,
.btn-text {
    font-size: 0.9rem !important;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
}

.card-links a:hover,
.btn-text:hover {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 10px var(--primary-glow);
}

.badge-new {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff007a, #ff4d4d);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(255, 0, 122, 0.4);
    animation: badgePulse 2s infinite;
    z-index: 2;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 122, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 0, 122, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 122, 0);
    }
}

/* Industry & Achievements */
.industry-list,
.achievements-list {
    max-width: 800px;
    margin: 0 auto;
}

.industry-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.industry-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.company-header h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #fff;
    font-weight: 600;
}

.role-timeline {
    position: relative;
    padding-left: 25px;
    border-left: 2px solid var(--card-border);
    margin-left: 10px;
}

.role-item {
    position: relative;
    margin-bottom: 40px;
}

.role-item:last-child {
    margin-bottom: 0;
}

.role-dot {
    position: absolute;
    left: -31px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.role-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #fff;
}

.role-date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-family: monospace;
    opacity: 0.8;
}

.role-item p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.role-item ul {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.role-item li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.role-item li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.achievements-list li {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.achievements-list li:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.achievements-list li i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* Contact */
.contact-intro {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.3rem;
    color: var(--text-muted);
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 40px 60px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 280px;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-glow);
}

.contact-card span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Footer */
footer {
    padding: 60px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-top: 1px solid var(--card-border);
    background: rgba(10, 10, 15, 0.5);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: #161622;
    margin: 10% auto;
    padding: 50px;
    border: 1px solid var(--primary-color);
    width: 80%;
    max-width: 800px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 0 50px rgba(108, 99, 255, 0.2);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

#modal-abstract-text {
    line-height: 1.9;
    font-size: 1rem;
    margin-top: 30px;
    color: var(--text-color);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-right: 0;
    /* Removed margin to rely on gap */
    transition: var(--transition);
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background: var(--nav-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--card-border);
        padding: 30px 0;
        gap: 25px;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.toggle .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.toggle .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.toggle .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 11px !important;
    }

    .section {
        padding: 80px 0;
    }

    .publications-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-card {
        width: 100%;
    }

    .modal-content {
        width: 90%;
        padding: 30px;
        margin: 20% auto;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* Citation Modal */
.bibtex-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid var(--card-border);
}

.bibtex-container pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    user-select: all;
}

/* Announcement Popup */
.announcement-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.announcement-popup.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.popup-content {
    background: rgba(22, 22, 34, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 400px;
    position: relative;
    border-left: 5px solid var(--accent-color);
}

.popup-icon {
    font-size: 2rem;
    color: var(--accent-color);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.popup-text h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #fff;
}

.popup-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.4;
}

.popup-text strong {
    color: var(--primary-color);
}

.btn-popup {
    display: inline-block;
    padding: 8px 15px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-popup:hover {
    background: var(--accent-color);
    color: #fff;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-popup:hover {
    color: #fff;
}

@media (max-width: 480px) {
    .announcement-popup {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }

    .popup-content {
        max-width: 100%;
    }
}

#copy-citation-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.card-links {
    flex-wrap: wrap;
    row-gap: 15px;
}