/* ==========================================================================
   Academic Personal Website Stylesheet
   Author: Josias Moukpe
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables / Theme Configuration
   -------------------------------------------------------------------------- */
:root {
    /* Light Theme (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a2e;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #dee2e6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Type Colors */
    --color-publication: #4285f4;
    --color-product: #ea8c00;
    --color-project: #34a853;
    
    /* Typography */
    --font-serif: 'Space Mono', 'Fira Code', monospace;
    --font-sans: 'Fira Code', 'Source Sans 3', -apple-system, BlinkMacSystemFont, monospace, sans-serif;
    --font-mono: 'Fira Code', 'Space Mono', monospace;
    
    /* Spacing */
    --container-width: 900px;
    --section-gap: 1.25rem;
    --navbar-height: 60px;
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --accent-primary: #58a6ff;
    --accent-hover: #79b8ff;
    --border-color: #30363d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* --------------------------------------------------------------------------
   Scroll Progress Bar & Navigation
   -------------------------------------------------------------------------- */
.scroll-progress {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 300px;
    background: var(--border-color);
    border-radius: 2px;
    z-index: 1000;
    opacity: 1; /* Always visible */
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.scroll-progress.visible {
    opacity: 1;
}

.scroll-progress-bar {
    width: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    height: 0%;
    transition: height 0.1s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.scroll-sections {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    top: 0;
}

.scroll-section-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 10px;
    height: 10px;
    justify-content: center;
}

.marker-dot {
    width: 6px;
    height: 1px;
    background: var(--text-muted);
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.scroll-section-marker:hover .marker-dot {
    width: 12px;
    height: 2px;
    background: var(--accent-primary);
}

.scroll-section-marker.active .marker-dot {
    width: 12px;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.3);
}

.marker-label {
    position: absolute;
    left: 20px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-mono);
    transform: translateX(-5px);
}

.scroll-section-marker:hover .marker-label {
    opacity: 1;
    transform: translateX(0);
}

.scroll-nav {
    position: fixed;
    left: 6px; /* Center relative to the 2px line at left:20px. 
                  Line center is at 21px. Button center needs to be at 21px.
                  Button width 30px. Left = 21px - 15px = 6px. */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 380px; /* Increased to create gap between line and buttons to prevent marker overlap */
    z-index: 1001;
    opacity: 1; /* Always visible */
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through gap */
}

.scroll-nav.visible {
    opacity: 1;
}

.scroll-btn {
    width: 30px; /* Increased by 20% from 24px */
    height: 30px; /* Increased by 20% from 24px */
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: auto; /* Re-enable clicks */
    font-size: 0.75rem; /* Scaled up icon size */
    z-index: 1002;
}

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

/* --------------------------------------------------------------------------
   Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
}

.nav-logo:hover {
    color: var(--accent-primary);
}

.logo-text {
    display: inline-block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    text-decoration: none;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    position: relative;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

/* Light mode: show sun icon */
.theme-toggle .fa-sun {
    font-size: 1rem;
    color: var(--text-primary);
    display: block;
}

.theme-toggle .fa-moon {
    font-size: 1rem;
    color: var(--text-primary);
    display: none;
}

/* Dark mode: show moon icon */
[data-theme="dark"] .theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Main Content Container
   -------------------------------------------------------------------------- */
.main-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: calc(var(--navbar-height) + 2rem) 1.5rem 2rem;
}

/* --------------------------------------------------------------------------
   Bio Section
   -------------------------------------------------------------------------- */
.bio-section {
    padding: 0 0 var(--section-gap) 0;
    border-bottom: none;
}

.page-name {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.bio-content {
    display: grid;
    grid-template-columns: 1fr 208px;
    gap: 2.5rem;
    align-items: start;
}

.bio-text {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    line-height: 1.8;
}

.bio-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.bio-links a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bio-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.link-separator {
    color: var(--text-muted);
}

.link-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bio-text p {
    margin-bottom: 1.25rem;
}

.bio-text p:last-child {
    margin-bottom: 0;
}

.bio-photo {
    position: sticky;
    top: 100px;
    width: 208px;
    height: 208px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Section Styles
   -------------------------------------------------------------------------- */
.section {
    padding: var(--section-gap) 0;
    border-bottom: none;
}

.section:last-child {
    border-bottom: none;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Research Interests
   -------------------------------------------------------------------------- */
.interests-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.interest-item {
    padding-left: 1.3rem;
    position: relative;
}

.interest-item::before {
    content: "◆"; /* Diamond character */
    position: absolute;
    left: 0;
    top: 0.4rem;
    color: var(--accent-primary);
    font-size: 0.7rem; /* Adjusted size for diamond */
    font-weight: 600;
}

.interest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    padding: 0.25rem 0;
}

.interest-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-serif);
    flex: 1;
}

.interest-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

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

.interest-toggle i {
    transition: transform 0.3s ease;
}

.interest-item.expanded .interest-toggle i {
    transform: rotate(180deg);
}

.interest-description {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.interest-item.expanded .interest-description {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Open to Work Section
   -------------------------------------------------------------------------- */
.research-interests {
    border-bottom: none;
}

.open-to-work {
    background: transparent;
    margin: 0;
    padding: 3rem 0 3rem 0;
    border-radius: 0;
    border-bottom: none;
}

.opportunity-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--bg-primary);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: none;
    border: 1.5px solid #FFD700; /* Yellow border */
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.opportunity-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.opportunity-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.opportunity-content h2 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.opportunity-content p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.opportunity-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cta-buttons-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    color: var(--accent-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Timeline Section
   -------------------------------------------------------------------------- */
.timeline-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative; /* For gradient masks */
}

/* Add fade gradients to indicate scrolling */
/* Temporarily disabled
.timeline-container::before,
.timeline-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.timeline-container::before {
    left: 50px;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.timeline-container::after {
    right: 50px;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}
*/

.timeline-nav {
    width: 34px; /* Reduced by 15% from 40px */
    height: 34px; /* Reduced by 15% from 40px */
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 11; /* Above mask */
    font-size: 0.9rem; /* Slightly reduced font size */
}

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

.timeline-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.timeline-nav:disabled:hover {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.3; /* Keep opacity low */
}

/* Scroll buttons disabled state */
.scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none; /* Prevent hover interactions entirely */
}

.scroll-btn:disabled:hover {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.timeline-wrapper {
    flex: 1;
    overflow-x: auto; /* Enable native scrolling */
    overflow-y: hidden;
    position: relative;
    padding: 0 1rem;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); /* Additional soft fade */
    scrollbar-width: none; /* Firefox: hide scrollbar */
    -ms-overflow-style: none; /* IE/Edge: hide scrollbar */
    scroll-behavior: smooth; /* Smooth scrolling */
}

.timeline-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari: hide scrollbar */
}

.timeline-track {
    display: flex;
    gap: 0;
    /* transition: transform 0.5s ... -> Removed, using native scroll */
    padding: 0.5rem 0 1.5rem 0; /* Reduced top padding, increased bottom since details are above */
    align-items: center; /* Center items vertically */
    position: relative;
    width: max-content; /* Allow track to grow with content */
}

/* The central gray line */
.timeline-track::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 0;
    transform: translateY(-50%);
}

.timeline-item {
    width: 200px; /* Fixed width per item */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    position: relative;
    padding: 0 1rem;
}

.timeline-event {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem; /* Space above tick */
    min-height: 2.4em; /* Ensure consistent height */
    display: flex;
    align-items: flex-end; /* Align bottom */
    justify-content: flex-start;
    line-height: 1.2;
    transition: all 0.3s ease;
    transform-origin: bottom left;
    white-space: nowrap;
}

.timeline-item:hover .timeline-event {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.timeline-tick {
    width: 2px;
    height: 12px;
    background: var(--text-muted);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    /* Removed negative margin since line is centered */
}

/* Highlight tick on hover - Enhanced for visibility */
.timeline-item:hover .timeline-tick {
    background: var(--accent-primary);
    transform: scaleY(2); /* Make it longer */
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5); /* Glow to indicate selection */
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem; /* Space below tick */
    font-family: var(--font-mono);
    transition: all 0.3s ease;
    transform-origin: top left;
}

.timeline-item:hover .timeline-date {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Removed old .timeline-line since we use border-bottom now */
.timeline-line {
    display: none;
}

/* Timeline Details Area */
.timeline-details {
    margin-top: 0;
    margin-bottom: 0; /* Space handled by padding/layout */
    padding: 0.5rem 1rem;
    background: transparent;
    text-align: center;
    min-height: 2.5em;
    display: flex;
    align-items: flex-end; /* Align to bottom since it's above the track */
    justify-content: center;
    border: none;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
}

/* Add a subtle bottom gradient separator */
.timeline-details::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: radial-gradient(circle, var(--border-color) 0%, transparent 100%);
    opacity: 0.5;
}

#timeline-description-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 800px;
    font-family: var(--font-mono);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 400;
}

.timeline-item:hover {
    cursor: pointer;
}

.timeline-details.active #timeline-description-text {
    color: var(--text-secondary);
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Legend Section
   -------------------------------------------------------------------------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header .section-title {
    margin-bottom: 0;
}

.legend-container {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-dot.publication {
    background: var(--color-publication);
}

.legend-dot.product {
    background: var(--color-product);
}

.legend-dot.project {
    background: var(--color-project);
}

/* --------------------------------------------------------------------------
   Papers Section
   -------------------------------------------------------------------------- */
.paper-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid;
    transition: all 0.3s ease;
    align-items: start;
}

.paper-item[data-type="publication"] {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.05), rgba(66, 133, 244, 0.03) 50%, var(--bg-primary) 100%);
    border-color: rgba(66, 133, 244, 0.3);
}

.paper-item[data-type="product"] {
    background: linear-gradient(135deg, rgba(234, 140, 0, 0.05), rgba(234, 140, 0, 0.03) 50%, var(--bg-primary) 100%);
    border-color: rgba(234, 140, 0, 0.3);
}

.paper-item[data-type="project"] {
    background: linear-gradient(135deg, rgba(52, 168, 83, 0.05), rgba(52, 168, 83, 0.03) 50%, var(--bg-primary) 100%);
    border-color: rgba(52, 168, 83, 0.3);
}

.paper-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.paper-item[data-type="publication"]:hover {
    border-color: rgba(66, 133, 244, 0.6);
    box-shadow: 0 10px 30px rgba(66, 133, 244, 0.15);
}

.paper-item[data-type="product"]:hover {
    border-color: rgba(234, 140, 0, 0.6);
    box-shadow: 0 10px 30px rgba(234, 140, 0, 0.15);
}

.paper-item[data-type="project"]:hover {
    border-color: rgba(52, 168, 83, 0.6);
    box-shadow: 0 10px 30px rgba(52, 168, 83, 0.15);
}

.paper-thumbnail {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    height: 100%;
    min-height: 140px;
    max-height: 200px;
}

.paper-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.paper-item:hover .paper-thumbnail img {
    transform: scale(1.05);
}

.paper-content {
    display: flex;
    flex-direction: column;
}

.paper-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.paper-type-indicator {
    width: 4px;
    height: 1.4em;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 2px;
}

.paper-type-indicator.publication {
    background: var(--color-publication);
}

.paper-type-indicator.product {
    background: var(--color-product);
}

.paper-type-indicator.project {
    background: var(--color-project);
}

.paper-authors {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.paper-venue {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.paper-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.paper-link {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.paper-link:hover {
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
}

.paper-abstract {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Miscellanea Section
   -------------------------------------------------------------------------- */
.misc-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.misc-section {
    display: flex;
    flex-direction: column;
}

.misc-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.misc-subtitle i {
    color: var(--accent-primary);
}

.misc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.misc-list li {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
}

.misc-item-title {
    font-weight: 600;
    font-size: 0.8rem;
}

.misc-item-venue {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.misc-resource-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 6px;
}

.misc-resource-link:hover {
    background: var(--bg-primary);
    text-decoration: none;
}

.misc-resource-link .misc-item-title {
    color: var(--accent-primary);
}

.misc-resource-link:hover .misc-item-title {
    color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   Map Section
   -------------------------------------------------------------------------- */
.map-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.map-text {
    text-align: left;
}

.map-text h2 {
    margin-bottom: 1rem;
    margin-top: 0;
}

.map-text p {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-top: 0;
}

.map-container {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-top: 2.8rem; /* Further adjusted to align perfectly with text */
}

.map-container {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.map-container iframe {
    display: block;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    text-align: left;
    background: var(--bg-secondary);
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Mobile Menu Overlay
   -------------------------------------------------------------------------- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: var(--bg-primary);
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

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

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 4rem;
}

.mobile-nav-links a {
    display: flex;
        align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-primary);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-nav-links a:hover {
    background: var(--bg-secondary);
    text-decoration: none;
}

.mobile-nav-links a i {
    width: 24px;
        text-align: center;
    color: var(--accent-primary);
}


/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --section-gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .bio-section {
        display: flex;
        flex-direction: column;
    }

    .page-name {
        font-size: 2rem;
        margin-bottom: 1rem;
        margin-top: 1rem;
        order: 1;
        text-align: center;
    }

    .bio-content {
        display: contents;
    }

    .bio-photo {
        order: 0;
        width: 200px;
        height: 200px;
        margin: 0 auto;
        position: static;
    }

    .bio-text {
        font-size: 0.9rem;
        order: 2;
    }

    .bio-links {
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
    }

    .desktop-only {
        display: none;
    }

    .opportunity-card {
        flex-direction: column;
        text-align: center;
    }
    
    .opportunity-icon {
        margin: 0 auto;
    }

    .misc-grid {
        grid-template-columns: 1fr;
    }

    .misc-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .paper-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .paper-thumbnail {
        width: 100%;
        max-width: none;
    }

    .timeline-container {
        gap: 0.5rem;
    }

    .timeline-wrapper {
        overflow-x: auto;
        width: 100%;
    }

    .timeline-nav {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .scroll-progress,
    .scroll-nav {
        display: none;
    }

    .map-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .map-container {
        height: 300px;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: calc(var(--navbar-height) + 1.5rem) 1rem 2rem;
    }

    .page-name {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        margin-top: 1rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .legend-container {
        gap: 1rem;
        justify-content: flex-start;
    }

    .paper-links {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-content {
        padding: 0;
    }

    .footer p {
        text-align: left;
        font-size: 0.65rem;
        line-height: 1.2;
        margin-bottom: 0;
    }
}
