/* Global Styles */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Background Gradient */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    transform: translateZ(0);
    /* Hardware acceleration */
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
}

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

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Simple hide for now, or use a hamburger menu */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        border-bottom: var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .nav-toggle {
        display: none;
    }
}

/* Buttons */
.btn-primary {
    background: var(--gradient-main);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
    /* Prevent text touching edges */
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

.hero-date {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    padding: 0 1rem;
    /* Ensure buttons don't touch edges */
}

.hero-logos-container {
    margin-top: 5rem;
    /* Vertical space from buttons */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-logos {
    height: 60px;
    max-width: 100%;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.hero-logos:hover {
    opacity: 1;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 2rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .hero-logos-container {
        flex-direction: column;
        /* Stack logos on mobile */
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .hero-logos {
        height: auto;
        max-height: 60px;
        max-width: 200px;
        /* Reasonable max width for mobile stacking */
    }
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    border-top: var(--glass-border);
    margin-top: 4rem;
    background: rgba(10, 10, 10, 0.5);
}

.footer-logo {
    height: 60px;
    max-width: 700%;
    /* Prevent overflow on small screens */
    object-fit: contain;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .footer-logo {
        height: auto;
        width: 350px;
        /* Reasonable default for mobile */
    }
}

.footer-logo-2 {
    height: 100px;
    max-width: 700%;
    /* Prevent overflow on small screens */
    object-fit: contain;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

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

.nav-offset {
    padding-top: calc(var(--header-height) + 2rem);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
    transform: translateZ(0);
    /* Force GPU layer */
}

.glass-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.glass-card strong {
    color: var(--text-main);
}

/* Schedule */
.schedule-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.schedule-item {
    display: flex;
    align-items: flex-start;
    background: var(--bg-card);
    border: var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    gap: 1.5rem;
}

.schedule-item:hover {
    transform: translateX(5px);
    background: var(--bg-card-hover);
}

.schedule-item.highlight {
    border-left: 4px solid var(--secondary);
}

.schedule-item .time {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    min-width: 140px;
}

.schedule-item .event-info {
    flex: 1;
}

.schedule-item .event {
    font-weight: 500;
    color: var(--text-main);
    font-size: 1.1rem;
}

.schedule-item .event-details {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .schedule-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .schedule-item .time {
        min-width: unset;
        font-size: 0.9rem;
    }
}

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

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-main);
    text-align: center;
    margin: 3rem 0 2rem;
}

.person-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.person-img-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.person-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-info h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.person-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Location */
.location-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    border: var(--glass-border);
}

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

.location-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* Responsive */
@media (min-width: 768px) {
    .location-container {
        flex-direction: row;
        align-items: center;
    }

    .map-container {
        flex: 1;
    }

    .location-info {
        flex: 1;
        text-align: left;
        padding-left: 2rem;
    }
}

/* Archive List */
.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.archive-link:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
}

.archive-link .year {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 1.5rem;
}

.archive-link .title {
    flex: 1;
    font-weight: 500;
}

.archive-link .arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Highlight Card */
.highlight-card {
    border: 1px solid var(--primary-glow);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Poster Catalog Styles */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    font-family: var(--font-main);
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
    opacity: 1;
}

.tab-btn:not(.active) {
    opacity: 0.7;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem !important;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.poster-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    height: 100%;
    min-width: 0;
    /* Critical for grid item shrinking */
    box-sizing: border-box;
    content-visibility: auto;
    /* Skip rendering cards while off-screen */
    contain-intrinsic-size: 1px 350px;
}

.poster-title {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    color: white;
}

.poster-presenter {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.2 rem;
}

.poster-affiliation {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
}

.poster-keywords,
.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    padding: 0.4rem 1.1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/*
.tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    color: #ffffff;
}
*/

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 3rem !important;
    border-color: rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.close-modal:hover {
    opacity: 1;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-body {
    line-height: 1.6;
}

.modal-meta {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-meta p {
    margin-bottom: 0.2rem;
}

.modal-abstract h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--secondary);
}

.modal-abstract p {
    color: var(--text-main);
    text-align: left;
    line-height: 1.5;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 1.5rem;
    }

    .nav-offset {
        padding-top: calc(var(--header-height) + 3rem);
    }

    .container {
        padding: 0 1rem;
    }

    .poster-grid {
        grid-template-columns: 100%;
        /* Use 100% to ensure it fits viewport */
        gap: 1.5rem;
    }

    .poster-card {
        padding: 1.5rem;
        width: 100%;
    }

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

    .modal {
        padding: 0.5rem;
        align-items: center;
    }

    .modal-content {
        max-height: 80vh;
        width: 95%;
        padding: 2rem 1.25rem !important;
        margin: auto;
        border-radius: 12px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
        padding-right: 2rem;
    }
}

/* Premium Details Link: Less "chunky", more "integrated" */
.details-link {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1.2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.7rem;
    transition: all 0.4s ease;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.details-link:hover {
    background: var(--gradient-main);
    /* Full vibrance on hover */
    border-color: transparent;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.05);
}

/* Staggered delays for grids if needed, but simple scroll trigger is often enough */