/* 
* Main stylesheet for Didier Merk's academic resume website
* Author: Didier Merk
* Version: 1.0
*/

/* ===== Base Styles ===== */
:root {
    --primary: #0a192f;
    --secondary: #64ffda;
    --text-primary: #ffffff;
    --text-secondary: #afb5c7;
    --background: #0a192f;
    --card-bg: #112240;
    --border: #233554;
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    --radius: 4px;
    --section-padding: 4rem 0;
    --heading-margin: 1rem 0 2rem;
}

.light-mode {
    --primary: #f5f5f5;
    --secondary: #007acc;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --background: #ffffff;
    --card-bg: #f7fafc;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Prevents header overlap when using anchor links */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
}

.section-title {
    position: relative;
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

.section-title::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
}

.subsection-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: var(--section-padding);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background: transparent;
    color: var(--secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-outline {
    border: 1px solid var(--secondary);
}

.btn:hover {
    background: rgba(100, 255, 218, 0.1);
    color: var(--secondary);
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: var(--transition);
    padding: 0.75rem 0;
    height: 70px;
}

.light-mode header {
    background-color: rgba(255, 255, 255, 0.85);
}

.header-scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

/* Header state when mobile menu is open */
.header-menu-open {
    background-color: var(--primary);
    backdrop-filter: none;
}

.light-mode .header-menu-open {
    background-color: var(--background);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--secondary);
}

.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Custom hamburger icon */
.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    border-radius: 2px;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.theme-toggle i {
    font-size: 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Theme Toggle */
.mobile-theme-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.mobile-theme-toggle i {
    font-size: 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    margin-bottom: 0.5rem;
}

.hero-text h3 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.social-links {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    margin-top: 1.5rem;
}

.social-links li {
    margin-right: 1.5rem;
}

.social-links a {
    color: var(--text-primary);
    font-size: 1.3rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

.hero-image {
    position: relative;
}

.profile-img-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary);
    margin: 0 auto;
    position: relative;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-backdrop {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    top: 20px;
    left: 20px;
    z-index: -1;
    border: 3px solid var(--secondary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 3px solid var(--secondary);
    border-bottom: 3px solid var(--secondary);
    transform: rotate(45deg);
    margin: -10px;
    animation: scrollArrow 2s infinite;
}

.scroll-arrow:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-arrow:nth-child(3) {
    animation-delay: 0.4s;
}

/* ===== About Section ===== */
.about {
    padding: 5rem 0 3rem;
    display: flex;
    align-items: flex-start;
}

.about-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Changed to 2:1 ratio (approximately 67% - 33%) */
    gap: 2rem;
    align-items: flex-start;
}

.about-content {
    display: flex;
    flex-direction: column;
}

.biography-content {
    margin-bottom: 2rem;
}

.biography-content p {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.biography-content p:last-child {
    margin-bottom: 0;
}

/* Tab System */
.about-cards {
    position: relative;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: auto;
    min-height: 200px; /* Reduced minimum height */
    display: flex;
    flex-direction: column;
    margin-top: -65px; 
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    position: relative;
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, margin-bottom 0.4s ease;
    overflow: hidden;
}

/* Simple class to hide the tabs */
.tabs-nav-hidden {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
    margin: 0;
    padding: 0;
    visibility: hidden;
}

/* To preserve the exact original layout and spacing */
.tabs-content {
    position: relative;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.4rem 1rem 0.75rem;
    font-size: 1.1rem;  /* Slightly reduced but still larger than original 0.95rem */
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    flex: 1;
    justify-content: center;
}

.tab-btn i {
    font-size: 1rem;  /* Slightly reduced but still larger than original 1.1rem */
    transition: var(--transition);
}

.tab-btn span {
    font-weight: 600;  /* Keep the increased font weight */
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--secondary);  /* Restored to var(--secondary) for the blue-ish color */
    /* Removed background-color */
    /* Removed border-radius */
}

.tab-btn.active i {
    color: var(--secondary);  /* Restored to var(--secondary) for the blue-ish color */
}

.tab-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;  /* Kept at 3px for slightly thicker indicator */
    background-color: var(--secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active .tab-indicator {
    transform: scaleX(1);
}

.tabs-content {
    position: relative;
    flex-grow: 1;
    overflow: hidden; /* Prevents content jumps */
}

.tab-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    width: 100%;
}

.tab-panel.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 2;
}

/* Sidebar Title Styling */
.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-title i {
    color: var(--secondary);
}

/* Education Card Styling */
.education-item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(35, 53, 84, 0.3);
}

.education-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.education-degree {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.education-institution {
    color: var(--secondary);
}

.education-date {
    color: var(--text-secondary);
}

/* Degree Detail Styling */
.degree-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.degree-link:hover {
    color: var(--secondary);
}

.degree-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.degree-link:hover::before {
    width: 100%;
}

.degree-details {
    display: none;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.degree-header {
    margin-bottom: 0.75rem;
}

.degree-detail-title {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.degree-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.degree-institution {
    color: var(--text-secondary);
}

.degree-years {
    font-weight: 500;
}

.degree-detail-info {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.degree-detail-info p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.degree-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: rgba(100, 255, 218, 0.05);
    border-radius: var(--radius);
    border-left: 3px solid var(--secondary);
}

.highlight-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 110px;
}

.highlight-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.highlight-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.back-to-education {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    position: relative;
    z-index: 10;
    margin-bottom: 0.5rem;
}

.back-to-education i {
    font-size: 0.7rem;
}

.education-overview {
    display: block;
}

/* Fix the education card - MODIFIED */
#education-card {
    position: relative;
    min-height: auto;
    overflow-y: visible;
}

/* Skills Card Styling */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.skill-item {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.skill-item::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--secondary);
}

/* ===== Experience Section ===== */
.experience {
    background-color: rgba(15, 32, 59, 0.4);
    padding: 5rem 0 3rem;
}

.light-mode .experience {
    background-color: rgba(247, 250, 252, 0.8);
}

.timeline {
    position: relative;
    margin-top: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    height: 100%;
    width: 2px;
    background-color: var(--border);
    left: 20px;
    top: 5px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2.5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--secondary);
    left: 13px;
    top: 5px;
    z-index: 1;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.timeline-item[data-expanded="true"] .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--secondary);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--secondary);
    transition: background-color 0.3s ease;
}

.timeline-item[data-expanded="true"] .timeline-date {
    background-color: rgba(100, 255, 218, 0.1);
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.timeline-item[data-expanded="true"] .timeline-content {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary);
    background-color: rgba(100, 255, 218, 0.05);
}

.timeline-header {
    display: flex;
    align-items: center; /* Center items vertically */
    position: relative;
    cursor: pointer;
    padding-right: 30px;
    gap: 15px; /* Space between logo and text */
}

/* Logo container */
.timeline-logo-container {
    flex-shrink: 0; /* Prevent container from shrinking */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.timeline-role-info {
    flex: 1;
}

.timeline-role {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.timeline-item[data-expanded="true"] .timeline-role {
    color: var(--secondary);
}

.timeline-company {
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.timeline-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.timeline-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    padding: 6px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.2); /* Increased from 0.12 to 0.2 */
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.15); /* Slightly stronger glow */
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border definition */
    filter: brightness(1.1); /* Subtle brightness boost */
}

/* Logo hover effect */
.timeline-logo:hover {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.2);
    transform: scale(1.05);
    filter: brightness(1.15);
}

/* Automatic logo background adjustment for light mode */
.light-mode .timeline-logo {
    background-color: rgba(10, 25, 47, 0.08); /* Slightly darker in light mode */
    box-shadow: 0 0 8px rgba(0, 122, 204, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    filter: none; /* No brightness adjustment needed in light mode */
}

.light-mode .timeline-logo:hover {
    background-color: rgba(10, 25, 47, 0.12);
    box-shadow: 0 0 12px rgba(0, 122, 204, 0.2);
}

.timeline-toggle {
    position: absolute;
    right: 0;
    top: 50%; /* Center vertically */
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.timeline-toggle:hover {
    color: var(--secondary);
    background-color: rgba(100, 255, 218, 0.1);
}

.timeline-item[data-expanded="true"] .timeline-toggle i {
    transform: rotate(180deg);
    color: var(--secondary);
}

.timeline-expandable {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0; /* Explicitly set initial margin */
    transition: max-height 0.5s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.timeline-item[data-expanded="true"] .timeline-expandable {
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
}

.timeline-description {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.timeline-links {
    display: flex;
    gap: 0.75rem;
}

/* Smaller buttons for timeline item links */
.timeline-expandable .timeline-links .btn,
.timeline-expandable .btn-outline {
    padding: 0.35rem 0.8rem;  /* Reduced from 0.5rem 1rem */
    font-size: 0.75rem;       /* Reduced from 0.85rem */
    letter-spacing: 0.5px;    /* Slightly tighter letter spacing */
    border-radius: 3px;       /* Slightly smaller radius if needed */
}

/* Ensure even spacing between buttons */
.timeline-expandable .timeline-links {
    display: flex;
    gap: 0.75rem;             /* Consistent spacing between buttons */
    margin-top: 1rem;
    flex-wrap: wrap;          /* Allows buttons to wrap on small screens */
}

/* Inline text links styling */
.inline-link {
    color: var(--secondary);
    text-decoration: none;
    position: relative;
    transition: var(--transition);
}

.inline-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.inline-link:hover {
    color: var(--secondary);
}

.inline-link:hover::after {
    width: 100%;
}

/* Light mode adjustment */
.light-mode .inline-link {
    color: var(--secondary);
}

.light-mode .inline-link:hover {
    color: var(--secondary);
}

/* Links without underline hover effect */
.no-underline-link {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

.no-underline-link:hover {
    color: var(--text-primary); /* Subtle color change on hover instead */
    text-decoration: none;
}

/* Light mode adjustment */
.light-mode .no-underline-link {
    color: var(--secondary);
}

.light-mode .no-underline-link:hover {
    color: var(--text-primary);
}

/* ===== Projects Section ===== */
.projects {
    padding: 5rem 0 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--border);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.25rem;
}

.project-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* Project Title Link Styling */
.project-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.project-title a:hover {
    color: var(--secondary);
}

.project-title a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.project-title a:hover::after {
    width: 100%;
}

.project-description {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags span {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    color: var(--secondary);
    background-color: rgba(100, 255, 218, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    font-size: 1.1rem;
}

/* ===== Publications Section ===== */
.publications {
    background-color: rgba(15, 32, 59, 0.4);
    padding: 5rem 0 3rem;
}

.light-mode .publications {
    background-color: rgba(247, 250, 252, 0.8);
}

.publications-list {
    margin-top: 2rem;
}

.publication-item {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.publication-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.publication-meta {
    margin-bottom: 0.75rem;
}

.publication-date {
    display: inline-block;
    background-color: var(--background);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.publication-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.publication-authors {
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.publication-journal {
    font-style: italic;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.publication-abstract {
    margin-bottom: 1rem;
}

/* Publication link styling refinement */
.publication-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.publication-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}


.publication-links a i {
    font-size: 1.1rem;
}

/* Citation Modal Styles */
.citation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.citation-modal-content {
    position: relative;
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 0;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    animation: scaleUp 0.3s ease forwards;
}

.citation-modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.citation-modal-header h3 {
    margin: 0;
    color: var(--secondary);
}

.citation-modal-close {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.citation-modal-close:hover {
    color: var(--secondary);
    transform: scale(1.1);
}

.citation-modal-body {
    padding: 1.25rem;
    max-height: 300px;
    overflow-y: auto;
}

.bibtex-content {
    background-color: rgba(15, 32, 59, 0.4);
    padding: 1rem;
    border-radius: var(--radius);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    overflow-x: auto;
}

.light-mode .bibtex-content {
    background-color: rgba(240, 240, 245, 0.8);
}

.citation-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Copy button success/error states */
.copy-success {
    background-color: rgba(76, 175, 80, 0.15) !important;
    border-color: #4caf50 !important;
    color: #4caf50 !important;
    position: relative;
    overflow: hidden;
    animation: successPulse 1.5s ease;
}

.copy-error {
    background-color: rgba(244, 67, 54, 0.15) !important;
    border-color: #f44336 !important;
    color: #f44336 !important;
    position: relative;
    overflow: hidden;
    animation: errorShake 0.5s ease;
}

/* Modal buttons styling enhancement */
.citation-modal-footer .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.citation-modal-footer .btn i {
    transition: transform 0.3s ease;
}



/* ===== Footer ===== */
footer {
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 99;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}