/* ==========================================================================
   CSS Variables & Global Styles
   ========================================================================== */
:root {
    --primary-color: #0f172a;      /* Deep Slate Blue */
    --secondary-color: #3b82f6;    /* Vibrant Blue */
    --accent-color: #f59e0b;       /* Amber for highlights */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 5rem 0;
}

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

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

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.underline {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-color);
    margin-top: 0.5rem;
    border-radius: 2px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: var(--bg-white);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Update the existing nav-links style */
.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem; /* Slightly tighter gap to fit all items */
    align-items: center;
}

.nav-links a {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--bg-white);
}

/* Style for the divider */
.nav-divider {
    color: #475569;
    font-weight: 200;
    font-size: 1.2rem;
    margin: 0 0.5rem;
}

/* Style for the Database link to make it pop */
.db-link {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color) !important;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--accent-color);
}

.db-link:hover {
    background: var(--accent-color);
    color: var(--primary-color) !important;
}

/* Ensure mobile responsiveness handles the longer menu */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 10rem 0 6rem;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    color: var(--bg-white);
}

.hero-subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-affiliations {
    font-size: 1.1rem;
    font-weight: 400;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.hero-intro {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-portrait img {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: #2563eb;
    color: var(--bg-white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--bg-white);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-dark);
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
}

.btn-outline:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ==========================================================================
   Metrics & Profiles Cards
   ========================================================================== */
.metrics-profiles {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.academic-profiles {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.profile-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    flex: 1;
    text-align: center;
    border: 1px solid var(--border-color);
}

.profile-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.profile-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.profile-card p {
    font-size: 0.875rem;
    color: var(--text-light);
}

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

.scholar-metrics {
    display: flex;
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 1.5rem 2rem;
    border-radius: 0.5rem;
    gap: 2rem;
    box-shadow: var(--shadow-md);
}

.metric {
    text-align: center;
}

.metric-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.metric-label {
    font-size: 0.875rem;
    color: #cbd5e1;
}

.scholar-metrics {
    display: flex;
    justify-content: center;
    align-items: center;      /* vertically center all metrics */
    gap: 3rem;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.metric-number {
    font-size: 1.8rem;
    font-weight: 700;
}

.metric-label {
    margin-top: 0.3rem;
}

.metric-link {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #9db8ff;
    text-decoration: none;
    transition: color .2s ease;
}

.metric-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ==========================================================================
   Projects Grid
   ========================================================================== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.project-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.project-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   Publications Grid
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
}

.pub-card {
    background: var(--bg-white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pub-card:hover {
    box-shadow: var(--shadow-md);
}

.pub-card.first-author {
    border-top: 4px solid var(--accent-color);
}

.pub-image {
    position: relative;
    height: 200px;
    background: var(--primary-color);
    overflow: hidden;
}

.pub-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.journal-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bg-white);
    letter-spacing: 1px;
}

.journal-badge.mnras { background-color: #e11d48; }
.journal-badge.aa { background-color: #0284c7; }
.journal-badge.apj { background-color: #16a34a; }
.journal-badge.galaxies { background-color: #8b5cf6; }

.pub-content {
    padding: 1.5rem;
}

.pub-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.author-tag {
    color: var(--accent-color);
    font-weight: 600;
}

.pub-year {
    color: var(--text-light);
    font-weight: 500;
}

.pub-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--primary-color);
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.pub-links {
    display: flex;
    gap: 0.5rem;
}

/* ==========================================================================
   Latest News List
   ========================================================================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    border-left: 4px solid var(--secondary-color);
}

.news-date {
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 120px;
}

.news-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.news-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--primary-color);
    color: #cbd5e1;
    padding: 2rem 0;
    font-size: 0.875rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 4rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .metrics-profiles {
        flex-direction: column;
        margin-top: 3rem;
    }
    
    .news-item {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none; /* Add a hamburger menu for mobile in JS */
    }
}

/* ==========================================================================
   Subpage Headers & Utilities
   ========================================================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    color: var(--bg-white);
    padding: 10rem 0 4rem 0; /* Creates space for the fixed navbar */
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.pb-0 { padding-bottom: 0 !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-5 { margin-top: 3rem !important; }
.text-muted { color: var(--text-light); }
.text-sm { font-size: 0.85rem; }

/* Highlight Active Navigation Link */
.nav-links a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 4px;
}

/* ==========================================================================
   Biography Layout
   ========================================================================== */
.bio-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.bio-image {
    flex: 0 0 350px;
}

.bio-image img {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.bio-text {
    flex: 1;
}

.bio-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: 1.05rem;
}

.bio-text a {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.4);
    text-underline-offset: 3px;
}

.bio-text a:hover {
    text-decoration-color: var(--secondary-color);
}

@media (max-width: 992px) {
    .bio-container {
        flex-direction: column;
        align-items: center;
    }
    
    .bio-image {
        flex: 0 0 auto;
        max-width: 300px;
        margin-bottom: 1rem;
    }
}

/* ==========================================================================
   Card & Timeline Layout
   ========================================================================== */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.timeline-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.timeline-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 1.5rem;
    border-left: 2px solid var(--border-color);
    line-height: 1.5;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--secondary-color);
}

.timeline-list li:last-child {
    margin-bottom: 0;
}

.timeline-date {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.bg-light-wrapper {
    background-color: var(--bg-light);
    width: 100%;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

/* Adds a slight margin to the right of the flags so they don't touch the text */
.fi {
    margin-right: 6px;
    border-radius: 2px;
}

/* ==========================================================================
   Publications & Utilities
   ========================================================================== */
.lead-text {
    font-size: 1.05rem;
    color: var(--text-color);
    max-width: 1100px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Navigation Pills */
.pill-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 4px;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--secondary-color);
}

/* Featured Papers Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.featured-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--bg-white);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.featured-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--bg-light);
    box-shadow: var(--shadow-sm);
}

.featured-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.citation-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* Lists styling */
.publication-year {
    margin-bottom: 3rem;
}

.publication-year h4 {
    font-size: 1.5rem;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.publication-list, .talks-list, .posters-list {
    list-style: none;
    padding-left: 0;
}

.publication-list li, .talks-list li, .posters-list li {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
    position: relative;
    text-align: justify;
    line-height: 1.6;
}

/* Icons for lists */
.publication-list li::before, .talks-list li::before, .posters-list li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
}

.publication-list li::before {
    content: "\f15c"; /* Document icon */
    color: var(--secondary-color);
}

.talks-list li::before {
    content: "\f0a1"; /* Megaphone icon */
    color: var(--accent-color);
}

.posters-list li::before {
    content: "\f2c2"; /* ID Card/Poster icon */
    color: #10B981; /* A nice emerald green to distinguish it from the other two */
}

/* Icons for lists */
.publication-list li::before, .talks-list li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
}

.publication-list li::before {
    content: "\f15c"; /* Document icon */
    color: var(--secondary-color);
}

.talks-list li::before {
    content: "\f0a1"; /* Megaphone/presentation icon */
    color: var(--accent-color);
}

.publication-list a, .talks-list a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.4);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.publication-list a:hover, .talks-list a:hover {
    color: var(--secondary-color);
    text-decoration-color: var(--secondary-color);
}