/* ==========================================================================
   #teamdarmstadt WordPress Theme — Main Stylesheet
   ========================================================================== */

/* --- Reset & Base -------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', helvetica, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--red);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.td-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 2rem;
}

.td-section {
    padding: 5rem 2rem;
}

.td-section--light {
    background: var(--light);
}

.no-content-note {
    text-align: center;
    color: var(--grey);
    font-size: 0.9rem;
    padding: 2rem 0;
    font-style: italic;
}

/* --- Header ------------------------------------------------------------- */
#masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    height: 68px;
    transition: box-shadow 0.3s;
}

#masthead.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.13);
}

.site-logo {
    display: inline-block;
    background: var(--red);
    color: #fff !important;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.3rem 0.75rem;
    text-decoration: none;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.site-logo:hover {
    background: var(--red-dark);
}

#primary-navigation {
    margin-left: auto;
}

#primary-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

#primary-navigation a {
    color: var(--grey);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

#primary-navigation a:hover,
#primary-navigation a.active {
    color: var(--dark);
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --------------------------------------------------------------- */
#hero {
    position: relative;
    height: 100vh;
    min-height: 620px;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.60) 0%,
            rgba(0, 0, 0, 0.30) 60%,
            rgba(0, 0, 0, 0.10) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 6vw;
    max-width: 900px;
    color: #fff;
}

.hero-headline {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-cursor {
    display: inline-block;
    width: 3px;
    animation: blink 0.9s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0
    }
}

.hero-subtitle {
    font-size: 0.82rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero-subtitle .highlight {
    background: var(--red);
    padding: 0.1em 0.4em;
}

.hero-labs-line {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    opacity: 0.85;
}

.hero-labs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 2rem;
}

.lab-pill {
    display: inline-block;
    background: var(--red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.18rem 0.55rem;
    text-decoration: none;
    transition: background 0.2s;
}

.lab-pill:hover {
    background: var(--red-dark);
    color: #fff;
}

.lab-divider {
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
    font-size: 0.8rem;
}

.hero-social {
    display: flex;
    gap: 0.6rem;
}

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s, border-color 0.2s;
}

.hero-social a:hover {
    background: var(--red);
    border-color: var(--red);
}

/* Featured Item Card (Hero) */
.hero-featured-card {
    position: absolute;
    bottom: 2rem;
    right: 3rem;
    width: 320px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
    z-index: 10;
}

.hero-featured-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-featured-img-wrap {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.hero-featured-card:hover .hero-featured-img {
    transform: scale(1.05);
}

.hero-featured-body {
    padding: 1.25rem;
}

.hero-featured-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.hero-featured-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.hero-featured-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    transition: color 0.2s;
}

.hero-featured-card:hover .hero-featured-link {
    color: var(--red);
}

@media (max-width: 960px) {
    .hero-featured-card {
        bottom: 1.5rem;
        right: 1.5rem;
        left: 1.5rem;
        width: auto;
    }
}

/* --- Section headings --------------------------------------------------- */
.section-eyebrow {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c5a96c;
    margin-bottom: 0.1rem;
}

.section-eyebrow a {
    color: inherit;
    text-decoration: none;
}

.section-eyebrow a:hover {
    text-decoration: underline;
}

.section-subtitle-location {
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--grey);
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.section-heading {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.section-subheading {
    text-align: center;
    font-style: italic;
    color: var(--grey);
    margin-bottom: 3rem;
    font-size: 0.95rem;
}

/* Conference logo (team section) */
.conf-logo-wrap {
    text-align: center;
    margin-bottom: 1.2rem;
}

.conf-logo-img {
    max-height: 80px;
    max-width: 240px;
    width: auto;
    display: inline-block;
    object-fit: contain;
}

/* Lab logos */
.lab-logo-wrap {
    margin-bottom: 0.85rem;
}

.lab-logo-img {
    max-height: 56px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* --- Team --------------------------------------------------------------- */
#chi {
    background: var(--light);
}

.people-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 2.8rem;
    max-width: 1000px;
    margin: 0 auto;
}

.person-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 110px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

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

.person-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid #ddd;
    margin-bottom: 0.55rem;
    transition: border-color 0.2s;
    background: #e8e8e8;
}

.person-photo--placeholder {
    background: #ddd;
}

.person-card:hover .person-photo {
    border-color: var(--red);
}

.person-name {
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    color: var(--dark);
    line-height: 1.3;
}

/* --- Research grid ------------------------------------------------------ */
#research {
    background: var(--white);
}

.research-eyebrow {
    text-align: center;
    font-style: italic;
    color: var(--grey);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.papers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    max-width: 1100px;
    margin: 0 auto;
}

.paper-card {
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    outline: none;
}

.paper-card:hover,
.paper-card:focus {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.paper-card-thumb {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--light);
    overflow: hidden;
}

.paper-card-thumb img,
.paper-thumb-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.paper-thumb-placeholder {
    background: #ddd;
}

.paper-venue-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--red);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
}

.paper-card-body {
    padding: 0.7rem 0.85rem 0.85rem;
}

.paper-card-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.45;
}

.paper-award-icon {
    font-size: 0.82rem;
    margin-right: 0.15rem;
}

/* --- Modal -------------------------------------------------------------- */
#paper-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

#paper-modal-overlay.open {
    display: flex;
}

#paper-modal {
    background: #fff;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    border-radius: 2px;
    animation: modal-in 0.2s ease;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--grey);
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-media {
    margin-bottom: 1.4rem;
}

.modal-media img {
    width: 100%;
    height: auto;
    border-radius: 2px;
}

.modal-youtube-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 2px;
}

.modal-youtube-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.35;
    margin-bottom: 0.45rem;
}

.modal-authors {
    font-size: 0.83rem;
    color: var(--grey);
    margin-bottom: 1rem;
}

.modal-abstract {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.72;
    margin-bottom: 1rem;
}

.modal-venue {
    font-size: 0.83rem;
    font-style: italic;
    color: var(--grey);
    margin-bottom: 1.4rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.modal-doi-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--red);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
}

.modal-doi-link:hover {
    text-decoration: underline;
}

.modal-bibtex-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1.5px solid var(--red);
    color: var(--red);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.32rem 0.85rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: background 0.2s, color 0.2s;
}

.modal-bibtex-btn:hover,
.modal-bibtex-btn.copied {
    background: var(--red);
    color: #fff;
}

/* --- Labs --------------------------------------------------------------- */
#labs {
    background: var(--white);
}

.labs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 5rem;
    max-width: 960px;
    margin: 0 auto;
}

.lab-block h3 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dark);
    margin-bottom: 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 3px solid var(--red);
    display: inline-block;
}

.lab-block p {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.lab-link {
    display: inline-block;
    color: var(--red);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: color 0.2s;
}

.lab-link:hover {
    color: var(--red-dark);
}

/* --- Contact / Footer --------------------------------------------------- */
#contact {
    background: var(--light);
}

.contact-inner {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.contact-address {
    margin-bottom: 2rem;
}

.contact-address p {
    font-size: 0.88rem;
    color: var(--grey);
    line-height: 1.9;
}

.contact-address a {
    color: var(--red);
    text-decoration: none;
}

.contact-address a:hover {
    text-decoration: underline;
}

.contact-social {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid #ccc;
    border-radius: 50%;
    color: var(--grey);
    font-size: 0.95rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.contact-social a:hover {
    border-color: var(--red);
    color: var(--red);
}

.footer-bar {
    background: var(--light);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.73rem;
    color: var(--grey);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.footer-links {
    margin: 0.7rem 0;
}

.footer-links a {
    color: var(--grey);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--red);
}

.footer-credits {
    font-size: 0.68rem;
    opacity: 0.55;
    margin-top: 0.6rem;
    text-transform: none;
    letter-spacing: 0;
}

.footer-credits a {
    color: inherit;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 960px) {
    .papers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .labs-grid {
        gap: 2.5rem 3rem;
    }
}

@media (max-width: 768px) {
    #masthead {
        padding: 0 1rem;
        height: 58px;
    }

    #primary-navigation {
        display: none;
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
    }

    #primary-navigation.open {
        display: block;
    }

    #primary-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    #primary-navigation a {
        display: block;
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }

    .nav-toggle {
        display: flex;
    }

    .td-section {
        padding: 3.5rem 1.5rem;
    }

    .td-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 600px) {
    .papers-grid {
        grid-template-columns: 1fr;
    }

    .labs-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    #paper-modal {
        padding: 2rem 1.25rem 1.5rem;
    }

    .hero-content {
        padding: 0 1.5rem;
    }
}