:root {
    --bg-color: #0a192f;
    --text-main: #a8b2d1;
    --text-light: #ccd6f6;
    --accent: #64ffda;
    --card-bg: #112240;
    --card-hover: #233554;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Layout Container */
.layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    padding: 0 40px;
}

/* Left Sidebar (Fixed) */
.sidebar {
    width: 40%;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar h1 {
    color: var(--text-light);
    font-size: 3rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.sidebar h2 {
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 500;
    margin: 10px 0 20px 0;
}

.sidebar p {
    max-width: 300px;
    font-size: 1rem;
    margin-bottom: 40px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.nav-links a::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 1px;
    background-color: var(--text-main);
    margin-right: 15px;
    transition: width 0.3s, background-color 0.3s;
}

.nav-links a:hover {
    color: var(--text-light);
}

.nav-links a:hover::before {
    width: 50px;
    background-color: var(--text-light);
}

.socials {
    margin-top: 20px;
    margin-bottom: 20px;
}

.socials a {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-right: 20px;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--accent);
}

/* Right Content (Scrolling) */
.content {
    width: 60%;
    padding: 80px 0;
}

section {
    margin-bottom: 100px;
}

section h3 {
    display: none; /* Hidden on desktop, shown on mobile */
}

/* Experience Cards */
.card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    transition: background-color 0.3s;
    margin-bottom: 20px;
    cursor: pointer;
}

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

.card-header {
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-title {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-title span {
    color: var(--accent);
}

.card-desc {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 850px) {
    .layout {
        flex-direction: column;
        padding: 0 20px;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 60px 0;
    }
    .content {
        width: 100%;
        padding: 20px 0 80px 0;
    }
    .nav-links {
        display: none; /* Hide nav links on mobile to save space */
    }
    section h3 {
        display: block;
        color: var(--text-light);
        font-size: 1.25rem;
        margin-bottom: 20px;
        position: sticky;
        top: 0;
        background-color: rgba(10, 25, 47, 0.9);
        backdrop-filter: blur(5px);
        padding: 10px 0;
        z-index: 10;
    }
}

/* Publication page specific styles */
.section-title {
    color: var(--text-light);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--card-hover);
    padding-bottom: 10px;
}

.pub-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 8px;
    transition: background-color 0.3s;
    margin-bottom: 15px;
}

.pub-item:hover { background-color: var(--card-bg); }

.pub-year {
    color: var(--accent);
    font-family: monospace;
    font-size: 1rem;
    margin-bottom: 8px;
}

.pub-title {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.pub-authors {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.pub-authors strong { color: var(--text-light); }

.pub-journal {
    font-style: italic;
    font-size: 0.9rem;
    color: #8892b0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 40px;
    transition: transform 0.2s;
}

.back-link:hover { transform: translateX(-5px); }

.nav-links a.active { color: var(--text-light); }
.nav-links a.active::before {
    width: 50px;
    background-color: var(--text-light);
}

.sub-nav {
    list-style: none;
    padding-left: 20px; /* Indent the sub-navigation */
    margin-top: 10px;
}

.sub-nav li a {
    font-weight: 700 !important; /* Make the font bold */
    font-size: 0.8rem !important; /* Adjust font size if needed */
    text-transform: none !important; /* Keep the original case */
}

.category-title {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-hover);
    padding-bottom: 10px;
}

.card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.gallery-item {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.lightbox-modal.visible {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    max-width: 80%;
    max-height: 80%;
    position: relative;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}
