@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    --color-bg: #0a192f;
    --color-bg-light: #112240;
    --color-text: #e6f1ff;
    --color-text-secondary: #a8b2d1;
    /* Lighter for better contrast */
    --color-accent: #64ffda;
    --color-accent-secondary: #bd34fe;

    --glass-bg: rgba(17, 34, 64, 0.85);
    /* Slightly more opaque for readability */
    --glass-border: rgba(100, 255, 218, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

    --spacing-unit: 30px;
    --content-width: 1000px;
    --border-radius: 8px;

    --nav-height: 80px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    /* Better readability */
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    opacity: 0;
    /* JS will fade in */
    transition: opacity 0.5s ease-in;
}

body.loaded {
    opacity: 1;
}

#tsparticles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
}

/* Scanline Effect */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 4.6rem;
    line-height: 1.1;
    margin-bottom: 23px;
}

h2 {
    font-size: 2rem;
    border-left: 4px solid var(--color-accent);
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--color-text);
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #fff;
}

/* Layout */
.wrapper {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    position: relative;
    z-index: 1;
    padding-bottom: 60px;
}

@media (max-width: 900px) {
    .wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* Page Sections - Uniform Spacing */
.page-section {
    padding-top: 40px;
    padding-bottom: 80px;
    min-height: auto;
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* Add top spacing for all sections except home */
.page-section:not(#home) {
    margin-top: var(--nav-height);
}

/* Home section - centered content */
#home.page-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
    position: relative;
}

.home {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: var(--nav-height);
    padding-bottom: 100px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-accent);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    animation: bounce 2s infinite;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.scroll-indicator:hover {
    opacity: 1;
    color: var(--color-text);
    transform: translateX(-50%) scale(1.2);
}

@keyframes bounce {

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

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--glass-shadow);
}

.back-to-top.visible {
    opacity: 0.8;
    pointer-events: all;
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 40px -10px rgba(100, 255, 218, 0.3);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Unified Container Style for All Sections */
.cv-container,
.projects-container,
.code-container,
.interests-container,
.publications-container,
.blog-index {
    max-width: 950px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.publication-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

.publication-item {
    background: rgba(17, 34, 64, 0.95);
    /* More solid/sensible background */
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: none;
    /* Remove blur for cleaner look if opacity is high */
}

.publication-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 40px -10px rgba(100, 255, 218, 0.15);
}

/* Show Animated Paper Button in Publication Box */
.show-animated-paper-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(100, 255, 218, 0.15);
    border: 1px solid var(--color-accent);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--color-accent);
    font-size: 0.9rem;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-animated-paper-btn:hover {
    transform: translateY(-2px);
    background: rgba(100, 255, 218, 0.25);
    box-shadow: 0 6px 20px 0 rgba(100, 255, 218, 0.3);
    color: #fff;
}

.show-animated-paper-btn i {
    font-size: 1rem;
}

.pub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 20px;
}

.pub-title {
    font-size: 1.5rem;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.pub-year {
    font-family: monospace;
    color: var(--color-accent);
    font-size: 1.1rem;
    background: rgba(100, 255, 218, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.pub-authors {
    font-family: var(--font-display);
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.pub-journal {
    color: var(--color-text-secondary);
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1rem;
    border-left: 2px solid var(--color-text-secondary);
    padding-left: 10px;
}

.pub-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.pub-links-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pub-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
    font-family: var(--font-display);
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid transparent;
}

.pub-links a:hover {
    color: var(--color-accent);
    background: rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.3);
}

.toggle-abstract {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s;
    font-family: var(--font-display);
    background: transparent;
    padding: 0;
    border: none;
    cursor: pointer;
}

.toggle-abstract:hover {
    color: var(--color-accent);
}

.abstract-chevron {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.toggle-abstract.active .abstract-chevron {
    transform: rotate(180deg);
}

.pub-abstract {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 3px solid var(--color-accent);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* Blog (Custom Design) */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
    list-style: none;
    padding: 0;
}

.post-item {
    background: rgba(17, 34, 64, 0.95);
    /* More solid/sensible background */
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: none;
}

.post-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 40px -10px rgba(100, 255, 218, 0.15);
}

.post-meta {
    font-family: monospace;
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: inline-block;
    background: rgba(100, 255, 218, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.post-title {
    margin: 10px 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.post-link {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

.post-link:hover {
    color: var(--color-accent);
}

.post-excerpt {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    font-family: var(--font-display);
    transition: all 0.3s;
}

.read-more-btn:hover {
    color: var(--color-accent);
    gap: 12px;
}

/* Glass Panels */
/* Glass Panels */
.glass-panel,
.card,
.project-card,
.repo-card,
.paper-item,
/* .publications-container, .blog-index moved to Open Box style */
.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    margin-bottom: 2rem;
}

.glass-panel:hover,
.card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 10px 40px -10px rgba(100, 255, 218, 0.2);
}

/* Navigation */
/* Main Navigation */
.nav-container {
    padding: 0 40px;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    margin: 0;
    border-radius: 0;
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.research-tabs {
    display: flex;
    gap: 15px;
    height: 100%;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    padding: 0 10px;
    height: 100%;
    font-family: var(--font-display);
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-link:hover,
.tab-link.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.nav-social-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-social-links a {
    color: var(--color-text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.nav-social-links a:hover {
    color: var(--color-accent);
}

/* Home Section Specifics */
.home .profile-bio {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 5rem;
    transform: scale(1.15);
    transform-origin: center center;
}

/* Hero Section Layout */
.hero-top-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 15px;
}

.mini-avatar {
    width: 138px;
    height: 138px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
    flex-shrink: 0;
    margin-right: 30px;
    margin-left: 12px;
}

.hero-top-row h1 {
    margin: 0;
    line-height: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-top-row {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .mini-avatar {
        margin: 0 auto 15px auto;
        width: 120px;
        height: 120px;
    }

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

    .location-info {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }

    .hero-avatar {
        width: 140px;
        height: 140px;
    }

    .nav-social-links {
        display: none;
        /* Hide socials in nav on mobile, maybe add to burger later */
    }

    .home .profile-bio {
        transform: scale(1);
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .mini-avatar {
        width: 100px;
        height: 100px;
        margin-right: 12px;
        margin-left: 8px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .scroll-indicator {
        bottom: 20px;
        font-size: 1.5rem;
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    color: var(--color-accent);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--color-bg-light);
    z-index: 200;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.open {
    transform: translateX(0);
}

@media (max-width: 900px) {
    .research-tabs {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-container {
        margin: 0;
        top: 0;
        border-radius: 0;
        background: rgba(10, 25, 47, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--glass-border);
        width: 100%;
        left: 0;
    }
}

/* Sidebar */
.social-sidebar {
    position: fixed;
    left: 40px;
    bottom: 0;
    width: 40px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-line {
    width: 1px;
    background: var(--color-text-secondary);
    margin: 0 auto;
}

.social-line.bottom {
    height: 90px;
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-icons li a {
    color: var(--color-text-secondary);
    font-size: 1.4rem;
    padding: 10px;
    transition: all 0.3s;
    display: block;
}

.social-icons li a:hover {
    color: var(--color-accent);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .social-sidebar {
        display: none;
    }
}

/* Navigation Avatar */
.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid var(--color-accent);
    object-fit: cover;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
    transition: transform 0.3s ease;
}

.nav-avatar:hover {
    transform: scale(1.1) rotate(5deg);
}

.logo-area {
    display: flex;
    align-items: center;
}

/* Profile */
.profile-section {
    display: flex;
    flex-direction: column;
    /* Centered column layout */
    align-items: center;
    gap: 2rem;
    min-height: 80vh;
    justify-content: center;
    max-width: 800px;
    /* Constrain width for better reading */
    margin: 0 auto;
}

/* Old large profile img styles removed/adjusted if needed, 
   keeping them for reference or other pages if used */
.profile-img {
    display: none;
    /* Hide large image on main page layout as per request */
}

/* Hero Box Animation & Style */
.profile-bio {
    text-align: center;
    border: 1px solid var(--color-accent);
    position: relative;
    padding-bottom: 70px;
    /* Enhanced border */
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.1);
}

.bio-text {
    text-align: left;
    /* Keep text readable */
    margin-top: 2rem;
}

@media (max-width: 800px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-img {
        margin-bottom: 2rem;
    }
}

/* Cards & Grid */
.projects-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.projects-slider {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, calc(50% - 15px));
    gap: 30px;
    transition: transform 0.5s ease;
}

.repo-grid,
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.slider-arrow {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.slider-arrow:hover {
    border-color: var(--color-accent);
    background: rgba(100, 255, 218, 0.1);
    transform: scale(1.1);
}

.slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.2);
}

.slider-dot:hover {
    background: rgba(100, 255, 218, 0.5);
}

@media (max-width: 900px) {
    .projects-slider-container {
        gap: 10px;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 100%);
    }
}

.project-card,
.repo-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.project-card .project-content,
.repo-card .project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card .project-content>p {
    margin-top: 0;
    margin-bottom: auto;
    min-height: 60px;
}

.project-card .project-progress,
.project-card .project-tags,
.project-card .project-link {
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(100, 255, 218, 0.15);
    border: 1px solid var(--color-accent);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--color-accent);
    font-size: 0.9rem;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 15px;
    align-self: flex-start;
}

.project-link:hover {
    transform: translateY(-2px);
    background: rgba(100, 255, 218, 0.25);
    box-shadow: 0 6px 20px 0 rgba(100, 255, 218, 0.3);
    color: #fff;
}

.project-link i {
    font-size: 0.9rem;
}

.tag {
    font-family: monospace;
    color: var(--color-accent);
    font-size: 0.8rem;
    margin-right: 10px;
}

/* Project Progress Bar */
.project-progress {
    margin: 20px 0;
}

.progress-bar {
    height: 8px;
    background: var(--color-bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--glass-border);
}

.progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.progress-labels span {
    position: relative;
}

.progress-labels span.active {
    color: var(--color-accent);
    font-weight: bold;
}

.progress-labels span.completed {
    color: var(--color-accent);
    opacity: 0.6;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    margin-top: 4rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    background: rgba(10, 25, 47, 0.95);
    text-align: center;
}

.site-footer p {
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-display);
    transition: all 0.2s;
    margin-right: 15px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 1rem;
}

.btn.btn-outline {
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(100, 255, 218, 0.1);
}

/* --- RESEARCH INTERESTS SECTION --- */
.interests-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.interests-tabs {
    display: flex;
    gap: 15px;
    background: rgba(17, 34, 64, 0.5);
    padding: 5px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.interest-tab-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.interest-tab-btn:hover {
    color: var(--color-accent);
}

.interest-tab-btn.active {
    background: var(--color-accent);
    color: var(--color-bg);
}

.interests-content-wrapper {
    min-height: 300px;
}

.interest-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.interest-panel.active {
    display: block;
}

.paper-item {
    padding: 25px;
    margin-bottom: 20px;
    border-left: 3px solid var(--color-accent);
    transition: transform 0.3s ease;
}

.paper-item:hover {
    transform: translateX(5px);
}

.paper-header h3 {
    margin: 0 0 5px 0;
    color: var(--color-text-primary);
    font-size: 1.2rem;
}

.paper-meta {
    font-family: monospace;
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.paper-comment {
    font-style: italic;
    color: var(--color-text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 2px solid rgba(100, 255, 218, 0.3);
}

.paper-comment i {
    color: var(--color-accent);
    margin-right: 8px;
    opacity: 0.5;
}

.paper-link {
    display: inline-block;
    color: var(--color-text-primary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.paper-link:hover {
    color: var(--color-accent);
}

/* --- CV INTERACTIVE REDESIGN (Central Timeline) --- */

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* The central line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.1);
}

.timeline-card {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 40px;
}

/* Left side */
.timeline-card.left {
    left: 0;
}

/* Right side */
.timeline-card.right {
    left: 50%;
}

/* The dots - centered on the line */
.timeline-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--color-bg);
    border: 3px solid var(--color-accent);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.timeline-card.left::after {
    right: -13px;
}

.timeline-card.right::after {
    left: -13px;
}

/* Date and location labels on timeline - opposite side of content */
.timeline-card::before {
    content: attr(data-period) "\A" attr(data-location);
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-bg);
    background: var(--color-accent);
    padding: 8px 12px;
    border-radius: 6px;
    top: 15px;
    z-index: 2;
    white-space: pre;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.4;
}

/* Left cards: date goes on right side */
.timeline-card.left::before {
    left: calc(100% + 30px);
}

/* Right cards: date goes on left side */
.timeline-card.right::before {
    right: calc(100% + 30px);
}

.timeline-card:hover::after {
    background-color: var(--color-accent);
    transform: scale(1.3);
    box-shadow: 0 0 20px var(--color-accent);
}

/* Content Box */
.timeline-content-box {
    padding: 25px;
    background: rgba(17, 34, 64, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    min-height: auto;
    height: auto;
}

.timeline-content-box h3 {
    margin-top: 0;
}

.timeline-content-box p,
.timeline-content-box ul {
    margin-bottom: 0;
}

.timeline-content-box p:last-child,
.timeline-content-box ul:last-child {
    margin-bottom: 0;
}

.timeline-card:hover .timeline-content-box {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    border-color: var(--color-accent);
}

/* Arrows */
.timeline-card.left .timeline-content-box::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 12px;
    width: 0;
    z-index: 1;
    right: -10px;
    border: medium solid var(--glass-border);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--glass-border);
}


.timeline-card.right .timeline-content-box::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 12px;
    width: 0;
    z-index: 1;
    left: -10px;
    border: medium solid var(--glass-border);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--glass-border) transparent transparent;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .timeline-container::after {
        left: 31px;
    }

    .timeline-card {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-card::after {
        left: 21px;
    }

    .timeline-card.right {
        left: 0%;
    }

    .timeline-card.left .timeline-content-box::before,
    .timeline-card.right .timeline-content-box::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--glass-border) transparent transparent;
    }
}

/* Skill Bars (Restyled to be cleaner) */
.skill-bar-container {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--color-text);
}

.skill-progress-bg {
    width: 100%;
    height: 6px;
    background: rgba(168, 178, 209, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress-fill {
    height: 100%;
    background: var(--color-accent);
    /* Unified color */
    width: 0;
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.4);
}

/* Research Skills List */
.research-skills-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.research-skills-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.research-skills-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 1.2rem;
    line-height: 1.6;
}

.research-skills-list li strong {
    color: var(--color-accent);
    font-weight: 600;
}

/* Languages Section */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.language-item {
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.language-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

.language-code {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-accent);
    margin-bottom: 15px;
    letter-spacing: 2px;
    opacity: 0.9;
    transition: all 0.3s ease;
    background: rgba(100, 255, 218, 0.1);
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    padding: 12px 16px;
    display: inline-block;
    position: relative;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
    min-width: 80px;
}

.language-code::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-secondary));
    border-radius: 8px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.language-item:hover .language-code {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.4);
}

.language-item:hover .language-code::before {
    opacity: 0.3;
}

.language-item h3 {
    margin: 10px 0;
    color: var(--color-text);
    font-size: 1.3rem;
}

.language-level {
    margin: 0;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.language-context {
    margin: 8px 0 0 0;
    color: var(--color-accent);
    font-style: italic;
    font-size: 0.85rem;
    opacity: 0.8;
    padding: 0 5px;
    width: 100%;
    box-sizing: border-box;
}

/* Blog Post Modal */
.blog-post-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.blog-post-container {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-post-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-post-btn:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: rotate(90deg);
}

.blog-post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--glass-border);
}

.blog-post-header h1 {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 2.5rem;
    line-height: 1.2;
}

.blog-post-body {
    line-height: 1.8;
    color: var(--color-text);
}

.blog-post-body h1,
.blog-post-body h2,
.blog-post-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.blog-post-body h2 {
    border-left: none;
    padding-left: 0;
}

.blog-post-body p {
    margin-bottom: 1.5rem;
}

.blog-post-body ul,
.blog-post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post-body li {
    margin-bottom: 0.5rem;
}

.blog-post-body code {
    background: rgba(100, 255, 218, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--color-accent);
}

.blog-post-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--color-accent);
}

.blog-post-body pre code {
    background: none;
    padding: 0;
    color: var(--color-text);
}

.blog-post-body blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

.blog-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.blog-post-body a {
    color: var(--color-accent);
    text-decoration: underline;
}

.blog-post-body a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .blog-post-container {
        max-height: 95vh;
        padding: 1.5rem;
    }

    .blog-post-header h1 {
        font-size: 1.8rem;
    }

    .close-post-btn {
        top: 10px;
        right: 10px;
    }
}

/* GitHub Repositories Styles */
.repo-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.repo-header h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.repo-header h3 a {
    color: var(--color-accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.repo-header h3 a:hover {
    color: #fff;
}

.repo-description {
    color: var(--color-text-secondary);
    flex-grow: 1;
    margin-bottom: 15px;
    line-height: 1.6;
}

.repo-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.repo-language {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text-secondary);
}

.repo-stat i {
    font-size: 0.85rem;
}

.repo-footer {
    margin-top: auto;
}

.repo-updated {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Location Info */
.location-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    justify-content: space-between;
}

.location-info i {
    color: var(--color-accent);
    font-size: 1.1rem;
}

.location-info span {
    line-height: 1.4;
}

/* Status Info */
.status-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.status-info i {
    color: var(--color-accent);
    font-size: 1.1rem;
}

.status-info span {

    line-height: 1.4;
}

/* Nothing Here Placeholder */
.nothing-here {
    text-align: center;
    padding: 3rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    /* Match publication-item styles */
    background: rgba(17, 34, 64, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    margin-top: 40px;
    width: 100%;

    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nothing-here:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 40px -10px rgba(100, 255, 218, 0.15);
}

.nothing-here .emoticon {
    font-size: 3rem;
    color: var(--color-text-secondary);
    /* Same as text, not accent/green */
    font-weight: bold;
    margin-bottom: 0.5rem;
    /* No animation, no green color */
}

/* Download CV Button */
.download-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid var(--color-accent);
    border-radius: 6px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-cv-btn:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(100, 255, 218, 0.3);
}

.download-cv-btn i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .download-cv-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .download-cv-btn span {
        display: none;
    }
    
    .download-cv-btn i {
        font-size: 1.2rem;
    }
}

/* Research Competencies Grid - Better layout for odd numbers */
.competencies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .competencies-grid {
        grid-template-columns: 1fr;
    }
}
