/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Global link styles */
a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: inherit;
}

a:hover {
    text-decoration: none;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 70px;
    gap: 2rem;
    min-height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    display: block;
    object-fit: contain;
}

.nav-brand h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #3C284F;
    padding: 8px 16px;
    white-space: nowrap;
    position: relative;
}

.nav-brand h2::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 30px;
    background-color: #3C284F;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.95rem;
    color: #3C284F;
}

.nav-link:hover {
    background-color: #f5f5f5;
    border-color: #e5e5e5;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    margin-top: 70px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: 
        linear-gradient(135deg, #f8f9fa 0%, #e9ecef 20%, #f1f5f9 40%, #e2e8f0 60%, #cbd5e1 80%, #94a3b8 100%),
        linear-gradient(45deg, rgba(60, 40, 79, 0.08) 0%, rgba(60, 40, 79, 0.15) 25%, rgba(60, 40, 79, 0.08) 50%, transparent 75%),
        linear-gradient(-45deg, rgba(60, 40, 79, 0.06) 0%, rgba(60, 40, 79, 0.12) 35%, rgba(60, 40, 79, 0.06) 65%, transparent 85%),
        linear-gradient(90deg, rgba(60, 40, 79, 0.05) 0%, transparent 25%, rgba(60, 40, 79, 0.10) 50%, transparent 75%, rgba(60, 40, 79, 0.05) 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(60, 40, 79, 0.25) 0%, rgba(60, 40, 79, 0.15) 25%, rgba(60, 40, 79, 0.08) 50%, transparent 75%),
        radial-gradient(circle at 90% 80%, rgba(60, 40, 79, 0.20) 0%, rgba(60, 40, 79, 0.12) 30%, rgba(60, 40, 79, 0.06) 60%, transparent 85%),
        radial-gradient(circle at 50% 15%, rgba(60, 40, 79, 0.18) 0%, rgba(60, 40, 79, 0.10) 40%, rgba(60, 40, 79, 0.05) 70%, transparent 90%),
        radial-gradient(circle at 80% 30%, rgba(60, 40, 79, 0.15) 0%, rgba(60, 40, 79, 0.08) 45%, rgba(60, 40, 79, 0.04) 75%, transparent 95%),
        radial-gradient(circle at 20% 75%, rgba(60, 40, 79, 0.12) 0%, rgba(60, 40, 79, 0.06) 60%, rgba(60, 40, 79, 0.03) 80%, transparent 100%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 35%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.25) 65%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(60, 40, 79, 0.08) 40%, rgba(60, 40, 79, 0.15) 60%, rgba(60, 40, 79, 0.08) 100%),
        linear-gradient(180deg, rgba(60, 40, 79, 0.06) 0%, transparent 25%, rgba(60, 40, 79, 0.10) 50%, transparent 75%, rgba(60, 40, 79, 0.06) 100%),
        linear-gradient(45deg, rgba(60, 40, 79, 0.04) 0%, transparent 40%, rgba(60, 40, 79, 0.08) 60%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-image {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-image img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #3C284F;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #666;
    font-weight: 300;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section:nth-child(even) {
    background-color: #f8f9fa;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: #3C284F;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.7;
}

.cv-link {
    margin-top: 2rem;
}

.btn-primary {
    display: inline-block;
    background: #3C284F;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #3C284F;
}

.btn-primary:hover {
    background: transparent;
    color: #3C284F;
}

/* Research Section */
.research-section {
    background: #f8f9fa;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.research-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.research-image {
    height: auto;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.research-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.research-content {
    padding: 1.5rem;
    text-align: center;
}

.research-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #3C284F;
    margin-bottom: 0.5rem;
}

.research-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.research-content .btn-primary {
    margin-top: 1rem;
    display: inline-block;
}

/* People Section */
.subsection-title {
    font-size: 1.5rem;
    color: #3C284F;
    margin: 2rem 0 1rem 0;
    text-align: center;
    font-weight: 600;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.person-card {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.person-card:hover {
    transform: translateY(-5px);
}

.person-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.person-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3C284F;
    margin-bottom: 0.5rem;
}

.position {
    font-weight: 500;
    color: #666;
    margin-bottom: 0.25rem;
}

.institution {
    color: #888;
    font-size: 0.9rem;
}

.person-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3C284F 0%, #4a7c59 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.person-placeholder span {
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Past Members Section */
.past-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.past-member-category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #3C284F;
}

.past-member-category h4 {
    font-size: 1.3rem;
    color: #3C284F;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.past-member-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px; /* Limit height to show ~3 items */
    overflow-y: auto;
    overflow-x: hidden;
}

.past-member-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}




@media (max-width: 768px) {
    .past-member-list {
        max-height: 250px; /* Slightly smaller on mobile */
    }
    .nav-logo {
        height: 32px;
        max-width: 100px;
    }
}

.past-member-item:hover {
    background: #e9ecef;
}

.past-member-item .name {
    font-weight: 600;
    color: #3C284F;
    font-size: 1rem;
}

.past-member-item .current-position {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Collaborators Section */
.collaborators-section {
    background: #f8f9fa;
}

.collaborators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.collaborator-card {
    text-align: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border-left: 4px solid #3C284F;
}

.collaborator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.collaborator-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3C284F;
    margin-bottom: 0.5rem;
}

.collaborator-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.collaborator-card h3 a:hover {
    color: #4a7c59;
}

.collaborator-card h3 a::after {
    content: '↗';
    font-size: 0.8rem;
    margin-left: 0.3rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.collaborator-card h3 a:hover::after {
    opacity: 1;
}

.collaborator-card .institution {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Projects Section */
.projects-section {
    background: #f8f9fa;
}

.projects-table-container {
    overflow-x: auto;
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.projects-table th {
    background: #3C284F;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.projects-table th:first-child {
    border-top-left-radius: 12px;
}

.projects-table th:last-child {
    border-top-right-radius: 12px;
}

.projects-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    color: #333;
    vertical-align: top;
}

.projects-table tbody tr:hover {
    background-color: #f8f9fa;
}

.projects-table tbody tr:last-child td {
    border-bottom: none;
}

/* Contact Section */
.contact-section {
    background: #f8f9fa;
}

.contact-grid {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3C284F;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #666;
    line-height: 1.5;
}

.contact-item a {
    color: #3C284F;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: none;
}

/* Footer */
.footer {
    background: #3C284F;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
    }
    
    .magnetar-workshop-card {
        max-width: 100%;
    }
    
    .magnetar-workshop-image {
        padding: 0;
        min-height: 150px;
    }
    
    .collaborators-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .past-members-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects-table th,
    .projects-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .nav-brand h2 {
        font-size: 1rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .hero-image img {
        max-width: 250px;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .nav-logo {
        height: 28px;
        max-width: 80px;
    }
    
    .nav-brand {
        gap: 0.5rem;
    }
    
    .nav-brand h2 {
        font-size: 0.9rem;
    }
}

/* Research Header */
.research-header {
    margin-top: 70px;
    padding: 4rem 0;
    background: linear-gradient(135deg, #3C284F 0%, #4a7c59 100%);
    color: white;
    text-align: center;
}

.research-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.research-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Detailed Research Sections */
.research-detail h2 {
    font-size: 2.2rem;
    color: #3C284F;
    margin-bottom: 2rem;
    text-align: center;
}

.research-content-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.research-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.research-text ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.research-text li {
    margin-bottom: 0.5rem;
    color: #666;
}

.research-image-large {
    text-align: center;
}

.research-image-large img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Publications */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.publication-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.publication-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Ensure publication buttons look like the main CTA */
.publication-card a.btn-primary {
    color: #fff;
}

.publication-card a.btn-primary:hover {
    color: #3C284F;
    background: transparent;
}

.publication-card:hover {
    transform: translateY(-5px);
}

.publication-card h3 {
    font-size: 1.3rem;
    color: #3C284F;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.publication-authors {
    font-weight: 500;
    color: #666;
    margin-bottom: 0.25rem;
}

.publication-journal {
    font-style: italic;
    color: #888;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.publication-abstract {
    color: #666;
    line-height: 1.6;
}

.publications-link {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

/* Responsive for research page */
@media (max-width: 768px) {
    .research-content-detailed {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .research-header h1 {
        font-size: 2.2rem;
    }
    
    .research-subtitle {
        font-size: 1.1rem;
    }
    
    .publications-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Page Styles */
.contact-details {
    max-width: 800px;
    margin: 0 auto;
}

.contact-card-large {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.contact-card-large h2 {
    font-size: 2.5rem;
    color: #3C284F;
    margin-bottom: 0.5rem;
}

.contact-card-large .title {
    font-size: 1.3rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.25rem;
}

.contact-card-large .department {
    color: #888;
    margin-bottom: 0.25rem;
}

.contact-card-large .university {
    font-weight: 600;
    color: #3C284F;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item-large {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.contact-item-large h3 {
    font-size: 1.4rem;
    color: #3C284F;
    margin-bottom: 1rem;
}

.contact-item-large p {
    color: #666;
    line-height: 1.6;
}

.contact-item-large a {
    color: #3C284F;
    text-decoration: none;
}

.contact-item-large a:hover {
    text-decoration: none;
}

.research-interests-contact {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.research-interests-contact h3 {
    font-size: 1.4rem;
    color: #3C284F;
    margin-bottom: 1rem;
    text-align: center;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.interest-tag {
    background: #3C284F;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Visit Information */
.visit-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.visit-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.visit-card h3 {
    font-size: 1.3rem;
    color: #3C284F;
    margin-bottom: 1rem;
}

.visit-card p {
    color: #666;
    line-height: 1.6;
}

/* Responsive for contact page */
@media (max-width: 768px) {
    .contact-card-large h2 {
        font-size: 2rem;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .visit-info {
        grid-template-columns: 1fr;
    }
    
    .interests-tags {
        justify-content: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.research-card,
.person-card,
.contact-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Specific size adjustment for Magnetar Workshop image */
.research-image img[alt="Magnetar Workshop"] {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Adjust the research card containing the magnetar workshop image */
.magnetar-workshop-card {
    max-width: 500px;
    margin: 0 auto;
}

/* Center the magnetar workshop research image container */
.magnetar-workshop-image {
    justify-content: center;
    align-items: center;
    padding: 0;
    min-height: 200px;
}