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

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

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

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    background: linear-gradient(135deg, #0066cc, #004499);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #0066cc;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #0066cc;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 60vh;
    max-height: none;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.7) 60%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 550px;
    padding: 2rem 2rem 2rem 5%;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #0a0a0a;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9); 
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 500;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.2);
}

.highlight {
    background: linear-gradient(135deg, #0066cc, #004499);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero-description {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 90%;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9); 
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 3;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-secondary {
    background: white;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-secondary:hover {
    background: #0066cc;
    color: white;
    transform: translateY(-2px);
}

/* Hero Visual */
.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 40%;
    z-index: 1;
}

.lab-photo-container {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.lab-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

.polarization-demo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: counter-rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes counter-rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* About Section */
.about {
    padding: 5rem 0;
    background: #ffffff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    font-weight: 300;
}

.about-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Science Section */
.science {
    padding: 5rem 0;
    background: #f8f9fa;
}

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

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

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

.science-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.science-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.science-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 600;
}

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

/* Technology Section */
.technology {
    padding: 5rem 0;
    background: #ffffff;
}

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

.tech-feature {
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #0066cc;
}

.tech-feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 600;
}

.tech-feature p {
    color: #666;
    line-height: 1.6;
}

/* Team Section */
.team {
    padding: 5rem 0;
    background: #f8f9fa;
}

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

.team-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a1a1a;
    font-weight: 600;
    text-align: center;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.team-member {
    flex: 0 0 280px;
    max-width: 280px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #004499);
    margin: 0 auto 1rem;
}

.team-member h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    font-weight: 600;
}

.team-member .affiliation {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.role-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.3rem;
}

.role-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.role-leadership { background-color: #ffd700; }
.role-instrumentation { background-color: #ff4444; }
.role-science { background-color: #44ff44; }
.role-pipeline { background-color: #4444ff; }
.role-dragonfly { background-color: #ff44ff; }

.role-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.legend-text {
    font-size: 0.9rem;
    color: #666;
}

/* Accomplishments Section */
.accomplishments {
    padding: 5rem 0;
    background: #ffffff;
}

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

.accomplishment-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #0066cc;
    transition: transform 0.3s ease;
}

.accomplishment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.accomplishment-date {
    color: #0066cc;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.accomplishment-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 600;
}

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

/* Dragonfly Info Section */
.dragonfly-info {
    padding: 5rem 0;
    background: #f8f9fa;
}

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

.dragonfly-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 2rem;
    transition: transform 0.3s ease;
}

.dragonfly-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

/* Page Sections (Hidden by default) */
.page-section {
    display: none;
    min-height: 80vh;
    padding-top: 80px;
}

.page-section.active {
    display: block;
}

/* Publications Page */
.publications {
    padding: 3rem 0;
}

.publication-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.publication-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.publication-authors {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.publication-journal {
    color: #0066cc;
    font-weight: 500;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #0066cc;
    font-weight: 600;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    text-align: center;
    color: #999;
}

/* Responsive Design - Combined and cleaned up */
@media (max-width: 1260px) {
    .hero {
        flex-direction: column;
        min-height: auto;
        padding: 6rem 2rem 4rem 2rem;
        background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 50%, #f1f8ff 100%);
    }
    
    .hero::before {
        display: none;
    }
    
    .hero-content {
        order: 1;
        padding: 2rem;
        max-width: 100%;
        text-align: center;
    }
    
    .hero-visual {
        order: 2;
        position: relative;
        left: 0;
        width: 100%;
        height: 50vh;
        margin-top: 2rem;
    }
    
    .lab-photo {
        border-radius: 12px;
        margin: 0 1rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .role-legend {
        flex-direction: column;
        align-items: center;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
}

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

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.science-image {
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.science-image:hover {
    transform: scale(1.02);
}

.science-icon {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 8px;
    display: block;
}

/* Code of Conduct Page */
.conduct-info {
    padding: 3rem 0 5rem 0;
    background: #f8f9fa;
}

.conduct-content {
    max-width: 800px;
    margin: 0 auto;
}

.conduct-text {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    line-height: 1.7;
}

.conduct-text h3 {
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-left: 0;
}

.conduct-text h3:first-child {
    margin-top: 0;
}

.conduct-text p {
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.conduct-list {
    color: #444;
    font-size: 1.1rem;
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.7;
}

.conduct-list li {
    margin-bottom: 0.5rem;
}

.conduct-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.conduct-link:hover {
    border-bottom-color: #0066cc;
}

.conduct-closing {
    color: #444;
    font-size: 1.1rem;
    margin: 2rem 0 1.5rem 0;
    text-align: justify;
}

.conduct-contact {
    color: #444;
    font-size: 1rem;
    margin-bottom: 0;
    text-align: center;
}

.acknowledgments {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #333;
    margin-top: 1rem;
}

.acknowledgments p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

/* Sponsors Section */
.sponsors {
    padding: 4rem 0;
    background: #ffffff;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.sponsor-item {
    transition: transform 0.3s ease;
}

.sponsor-item:hover {
    transform: translateY(-5px);
}

.primary-sponsor .sponsor-logo {
    height: 120px;
    width: auto;
}

.sponsor-logo {
    height: 90px;
    width: auto;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.sponsor-logo:hover {
    filter: grayscale(0%);
}

.sponsor-link {
    display: block;
    text-decoration: none;
}

@media (max-width: 768px) {
    .sponsors-grid {
        gap: 2rem;
    }
    
    .primary-sponsor .sponsor-logo,
    .sponsor-logo {
        height: 50px;
    }
}