/* 
------------------------------------
<---- Hero Banner + Text + Img ----> 
------------------------------------
*/

#hero-banner {
    display: flex;
    flex-direction: row;
    /* becomes column-reverse when too thin */
    justify-content: space-between;
    align-items: center;
    gap: var(--space-s);
    width: 100%;
    max-width: 60rem;
}

#hero-text {
    max-width: 60ch;
}

#hero-img {
    max-width: 40%;
}

/* 
----------------------------
<---- Interest section ----> 
----------------------------
*/

#interest-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: var(--space-s);
    align-items: stretch;
    width: 100%;
    flex-wrap: wrap;
}

.interest-card {
    background-color: var(--blue10);
    padding: var(--space-s);
    border-radius: var(--space-s);
    max-width: 60ch;
}

.interest-card>img {
    height: 10rem;
}

/* 
-----------------------------------
<---- Bongard problem section ----> 
-----------------------------------
*/

#bongard {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-s);
    width: 100%;
}

#bongard>p {
    text-align: center;
    max-width: 75ch;
}

#bongard>h2 {
    margin-bottom: 0;
    /* flex column gap does the trick */
}

#bongard-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-s);
    align-items: stretch;
    width: 100%;
}

#bongard-row>* {
    flex: 1 0 0;
    /* 
    All items are equally sized.
    Somehow prevents growing/shrinking when a button is pressed.
    */
}

.bongard-problem {
    background-color: var(--green10);
    padding: var(--space-s);
    text-align: center;
    border-radius: var(--space-s);
}

/* 
--------------------------
<---- Career section ----> 
--------------------------
*/

#career {
    width: 100%;
}

.career-stage {
    background-color: var(--blue10);
    padding: var(--space-s);
    border-radius: var(--space-s);

    margin-bottom: var(--space-s);
}

/*
    Contains description text + image
*/
.career-descriptor {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: var(--space-s);
    width: 100%;
    box-sizing: border-box;
}

.career-text {
    max-width: 75ch;
}

.career-stage img {
    max-width: min(20rem, 90%);
}

/* 
    List of publications
*/
.career-publications {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-s);
    width: 100%;
}

.publication {
    background-color: var(--blue10);
    padding: var(--space-s);
    border-radius: var(--space-s);
}

.publication-title {
    font-weight: bold;
}

/* 
    Event attendance
*/
.career-attendance {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-s);
}

.attendance {
    background-color: var(--blue10);
    padding: var(--space-s);
    border-radius: var(--space-s);
}

/* 
---------------------------------
<---- Miscellaneous section ----> 
---------------------------------
*/

#miscellaneous-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-s);
    align-items: stretch;
    width: 100%;
}

.misc-item {
    background-color: var(--green10);
    padding: var(--space-s);
    border-radius: var(--space-s);
    max-width: 60ch;
}

.misc-item>h3 {
    margin-top: 0;
}

@media (max-width:960px) {
    #hero-banner {
        flex-direction: column-reverse;
    }

    #bongard-row {
        flex-direction: column;
    }

    .career-descriptor {
        flex-direction: column;
    }

    /* 
    For example, a career block where the image is on the left side.
    On mobile, we want every picture to be under the career text.       
    */
    .left {
        flex-direction: column-reverse;
    }

    #miscellaneous-row {
        flex-direction: column;
    }
}