/* 首行缩进 */
p {
    text-indent: 1.5em; /* 设置首行缩进为1.5em，可以根据需要进行调整 */
}

/*数学公式*/
.inline-math {
      display: inline-block; /* 将数学公式显示为内联块元素 */
    }
/* header */
#header-container {
    width: 100vw; height: 100vh;
    z-index: -40;
    overflow: hidden;
    display: flex; justify-content: center;
  }
  
  #header-background {
    background-color: #f4f1de;
    width: 100%; height: 100%;
    z-index: -35;
  }
  
  .header-image {
    max-height: 100%;
    height: 80%;
    z-index: -30; /*potentially remove and put text further up */
    position: fixed;
  }
  
  
  .layer-wrapper {
    height: 80%;
    display: flex; justify-content: center; align-items: center;
    position: absolute;
    overflow: hidden;
  }
  
  .header-title {
    z-index: -29;
    text-align: center;
    color: #566b8a;
    font-size: 10vw;
    font-weight: bold;
    padding-top: 72vh;
    position: fixed;
    width: 100vw;
  }
  
  @media all and (min-width: 1200px) {
    .header-image {
      max-width: 100%;
      max-height: 500%;
    }
  }
  
  .bg-video {
    min-width: 100%
  }
  
  @media all and (max-width: 1050px) {
    .bg-video {
      min-width: fit-content;
      min-width: -webkit-min-content;
      min-width: -moz-min-content;
      min-height: 100%;
    }
  }
  
  @media all and (max-width: 450px) {
    .mobile-shift-right {
      left: -50vw;
    }
  
    .mobile-shift-more-right {
      left: -7rem;
    }
  
    .mobile-shift-left {
      right: -50vw;
    }
  
    .mobile-shift-more-left {
      right: -7rem;
    }
  
    .mobile-hide {
      display: none;
    }
  
    .mobile-scroll-out {
      height: 50%!important;
    }
  
  
  }
  
  @media all and (max-width: 890px) {
    .header-title {
      padding-top: 80vh;
      font-size: 12vw;
    }
  }
  
  
  
  
  
  #scroll-arrow-container {
    position: absolute; top: 90vh;
    display: flex; justify-items: center;
    font-size: 2.5rem;
    color: rgba(0, 0, 0, 0.3);;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    cursor: pointer;
  }
  
  #scroll-arrow {
    cursor: pointer;
  }
  
  svg.header-image:not(.no-animation) path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 4s ease-out forwards, fill-anim 1.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
  }
  
  svg.header-image ellipse, rect {
    animation: fill-anim-to1 1.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
  }
  
  
  
  @keyframes dash {
    to {
      stroke-dashoffset: 0;
    }
  }
  
  @keyframes fill-anim {
    from {
      fill-opacity: 0;
    }
  }
  
  @keyframes fill-anim-to1 {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  .design-attribution {
    position: absolute;
    top: 95vh; right: 3vw;
    font-size: 0.8rem;
    color: #4f4f4f;
    align-self: center;
  }
  
/* sidebar */
/* SIDEBAR */
#sidebar {
    background-color: rgba(0,0,0,0) !important;
    width: 14rem;
    position: absolute;
    left: 2rem;
    margin-top: 10rem;
    padding: 0 !important;
    text-align: left;
}

#sidebar-spacer {
    min-width: 16rem;
    height: 100%;
}

#sidebar-content-wrapper {
    display: flex; gap: 3rem; justify-content: center;
    width: 100vw;

    background-color: white;
    overflow: hidden;

    padding-bottom: 6rem;
}

.topic-subpages-wrapper {
    max-width: 900px;
    text-align: justify;
    display: flex;
    flex-direction: column;
    padding-right: 3rem;
}

#sidebar .nav-link {
    background-color: rgba(0, 0, 0, 0) !important;
    color: black;
    position:relative;
    font-size: 1.4rem;
}

#sidebar .nav-link.sup-link:hover, .chapter-wrapper.active .sup-link {
    color: rgb(166, 219, 237) !important;
    font-weight: bold;
}

#sidebar .nav-link.sub-link:hover, #sidebar .nav-link.sub-link.active {
    color: #8199B2 !important;
}


#sidebar .nav-link.active {
    font-weight: bold;
}

.nav-link.sub-link {
    font-size: 0.9rem !important;
    padding-top: 0 !important;
    color: gray !important;
}

.chapter-wrapper.active .sub-link {
    display: block;
}


.chapter-wrapper.inactive .sub-link {
    display: none
}







#sidebar-mobile-button {
    display: none;
}

.topic-subpages-wrapper.no-sidebary {
    padding: 0 1.5rem;
}

/* mobile */
@media all and (max-width: 680px) {
    #sidebar-wrapper-mobile a.sub-link {
        font-size: 1.2rem !important;
    }


    .imp-special {
        width: 98vw;
    }

    #sidebar-content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    #sidebar-spacer {
        display: none;
        height: 0; width: 0;
    }

    #sidebar {
        position: static;
        display: block;
        width: 84vw;
        margin-top: 2.5rem;
    }

    .topic-subpages-wrapper {
        padding: 0 1.5rem;
    }


    #mobile-sidebar-background {
        width: 100vw; height: 100vh;
        display: none;
        position: fixed; top: 0; left: 0;
    }

    #mobile-sidebar-background.active {
        display: block;
    }


    #sidebar-mobile-wrapper {
        display: flex; align-items: center; height: 100vh; position: fixed; top:0; left: 0; width: 0; overflow: visible;
    }

    #sidebar-mobile {
        z-index: 2;
        display: flex; align-items: center; justify-content: right;
        height: 40vh; width: 85vw;
        position: absolute; left: -81.4vw;
        background-color: rgba(0, 0, 0, 0.25);
        color: #ffffff;
        border-radius: 1rem;
        cursor: pointer;

        opacity: 0; /* controlled by headerParallax.js */

        -webkit-transition:background-color 0.5s, opacity 0.5s;
        -moz-transition:background-color 0.5s, opacity 0.5s;
        -o-transition:background-color 0.5s, opacity 0.5s;
        transition:background-color 0.5s, opacity 0.5s;



        overflow: hidden;
        max-height: 80vh !important;
    }

    #sidebar-mobile.active {
        background-color: rgba(0, 0, 0, 0.9);
        -webkit-transition:background-color 0.5s, opacity 0.5s;
        -moz-transition:background-color 0.5s, opacity 0.5s;
        -o-transition:background-color 0.5s, opacity 0.5s;
        transition:background-color 0.5s, opacity 0.5s;

        overflow-y: scroll;
    }

    #sidebar-mobile .sup-link {
        color: #8199B2 !important;
        font-weight: bold;
    }

    #sidebar-mobile .sub-link {
        color: #8199B2 !important;
    }


    #sidebar-wrapper-mobile {
        padding-top: 1rem; padding-bottom: 1rem;
        width: 75vw;
    }

    #mobile-icon {
        display: flex;
        width: 5vw; height: 40vh;
        font-size: 2.5rem;
        position: fixed; margin-right: 0.6rem; padding-left: 0.2rem;
        align-items: center;
    }

    #sidebar-wrapper-mobile .chapter-wrapper {
        width: 90%;
    }
}

/* underlining animation only on desktop */
@media all and (min-width: 551px) {
    #sidebar .nav-link::after {
        position: absolute;
        bottom: 0;
        left: -25%;
        right: 0;
        margin: auto;
        width: 0;
        content: "";
        height: 4px;
        transition: all 0.5s;
    }

    #sidebar .sup-link:after {
        background-color: #8199B2;
    }

    #sidebar .sub-link:after {
        background-color: #8199B2;
    }

    #sidebar .nav-link:hover::after {
        width: 60%;
        transition: all 0.5s;
    }
}


/* get rid of headbutting when pressing on links, courtesy: https://css-tricks.com/hash-tag-links-padding/ */
#sidebar-content-wrapper h4::before, #sidebar-content-wrapper h5::before ,#sidebar-content-wrapper h3::before {
    display: block;
    content: " ";
    margin-top: -80px;
    height: 80px;
    visibility: hidden;
    pointer-events: none;
}

#sidebar-content-wrapper h4, .event-text h4 {
    text-align: center;
    font-size: 3rem;
    color: #4566a2;
    padding-top: 4rem;
    font-weight: bolder;
}

#sidebar-content-wrapper h5, .event-text h5 {
    text-align: center;
    font-size: 1.8rem;
    color: #4aaeea;
    font-weight: normal;
    padding-top: 2rem;
}

#sidebar-content-wrapper h3, .event-text h3 {
    text-align: center;
    font-size: 3rem;
    color: #2491d3;
    font-weight: bolder;
    padding-top: 1rem;
}

.event-text h5 {
    margin-top: 0;
}

.event-text h3 {
    margin-top: 0;
}


.text-wrapper {
    margin-top: 1rem;
}

.image-wrapper {
    display: flex;
    width: 100%;
    justify-content: center;
}

.pdf-wrapper {
    margin-top: 1rem;
    display: flex;
    width: 100%;
    height: 70vh;
    justify-content: center;
}

.topic-subpages-wrapper img, .image-wrapper img {
    max-width: 100%;
    align-self: center;
}

.caption {
    font-size: 0.9rem;
    line-height: 1rem;
    margin-bottom: 1.5rem;
}

.under-title-info  {
    font-size: 1rem;
    color: #AAA;
    align-self: center;
}

.attribution {

}

.name-link, .outside-link,.outgoing-link, .ingoing-link {
    text-decoration: none;
    color: #999;
    background-color: rgba(0, 0, 0, 0);
    box-shadow: inset 0 -0.5em 0 -1px rgba(153, 153, 153, 0.47);
    cursor: pointer;
}

.ingoing-link {
    color: black;
    box-shadow: inset 0 -0.5em 0 -1px #F2CC8F;
}

.document {
    font-weight: bold;
    width: fit-content !important;
}


.name-link:hover, .ingoing-link:hover {
    color: #666;
    box-shadow: inset 0 -0.5em 0 -1px #F2CC8F;
}

.outside-link, .outgoing-link {
    color: #000;
    box-shadow: inset 0 -0.5em 0 -1px rgba(51, 102, 204, 0.63);
}
.outside-link:hover, .outgoing-link:hover {
    color: #3366CC;
    box-shadow: inset 0 -0.5em 0 -1px rgba(51, 102, 204, 0.5);
}

h5 {
    margin-bottom: 0 !important;
}

h3 {
    margin-bottom: 0 !important;
}

.text-wrapper {
    margin-top: 1rem;
}


.content-hider {
    display: flex; flex-direction: column;
    text-decoration: none;
    width: 100%;
    height: 2rem;
    overflow: hidden;

    margin-top: 1rem;
}

.content-hider.open {
    height: auto;
    overflow: visible;
}



.content-opener {
    width: 100%;
    align-self: center;

    text-decoration: none;
    color: #888;
    cursor: pointer;
    box-shadow: inset 0 -0.5em 0 -1px rgba(180, 180, 180, 0.5);
}

.content-opener:hover {
    text-decoration: none;
    color: #333;
    cursor: pointer;
    box-shadow: inset 0 -0.5em 0 -1px rgb(242, 204, 143, 0.5);
}

.content-hider.open .content-opener {
    color: #333;
    box-shadow: inset 0 -0.5em 0 -1px rgb(242, 204, 143, 0.5);
}
.no-sidebar {
    margin-bottom: 3rem;
}

.no-sidebary {
    padding-bottom: 0 !important;
}


/* back-to-overview */
#scroll-back {
    display: flex; align-items: center; justify-content: center;
    position: fixed; right: 1rem; bottom: 1rem;
    background-color: rgba(244, 241, 222, 0.9);
    border-radius: 0.4rem;
    width: 3rem; height: 3rem;
    font-family: monospace;
    font-size: 2rem;
    padding-top: 0.7rem;
    cursor: pointer;
    opacity: 0; /* controlled by headerParallax.js */

    -webkit-transition: opacity 0.5s;
    -moz-transition: opacity 0.5s;
    -o-transition: opacity 0.5s;
    transition: opacity 0.5s;
}

#spotlight {
    display: none;
    width: 80vw; height: 80vh;
    position: fixed; left: 10vw; top: 100vh;
    background-color: #F4F1DE;
    color: #000000;
    border-radius: 0.5rem;
    z-index: 40;
    overflow: scroll;
    overflow-x: hidden;
}

#x-icon {
    cursor: pointer;
    width: 2.2rem;
    height: 2.2rem;
    position: absolute; right: 0.4rem; top: 0.4rem;
}

#x-icon-doc {
    cursor: pointer;
    width: 2.1rem;
    height: 2.1rem;
    position: absolute; right: 0.1rem; top: 0.1rem;
}

#x-icon:hover, #x-icon-doc:hover {
    background-color: rgba(0, 0, 0, 0.37);
    border-radius: 0.2rem;
}

#x-icon:hover span, #x-icon-doc:hover span {
    background: #F4F1DE;
}

#x-icon span, #x-icon-doc span {
    display: block;
    position: absolute; top: 1rem; left: 0.2rem;
    height: 0.2rem;
    width: 1.8rem;
    background: #f4a460;
    border-radius: 0.2rem;
    opacity: 1;
}

#x-icon span:nth-child(1), #x-icon-doc span:nth-child(1){
    transform: rotate(45deg);
}

#x-icon span:nth-child(2), #x-icon-doc span:nth-child(2){
    transform: rotate(-45deg);
}

#spotlight .img-wrapper {
    float: right;
    width: 30vw; height: 30vw;
    overflow: hidden;
    border-radius: 0.4rem;
    margin: 1.3rem 1.3rem .3rem 1rem;
}

#spotlight-img {
    width: 100%;
    height: auto;
}

#spotlight-text {
    text-align: justify;
    width: 80vw;
    padding: 1rem;
    font-size: 2.2rem;
}

#spotlight-name {
    font-size: 4rem;
    color: #2b737e;
    text-align: left;
    padding-left: 1rem;
}

/* mobile */
@media all and (max-width: 680px) {
    #spotlight {
        width: 90vw;
        left: 5vw;
    }

    #spotlight-name {
        font-size: 10vw;
        text-align: center;
        padding: 0
    }

    #spotlight-text {
        text-align: justify;
        width: 90vw;
        padding: 5vw;
        font-size: 1rem;
    }

    #spotlight .img-wrapper {
        width: 50vw; height: 50vw;
        overflow: hidden;
        border-radius: 0.4rem;
        margin: 0.6rem 20vw 0;
    }
}

/* spotlight */
#spotlight-background {
    display: none;
    position: fixed; top: -5vh; left: -5vw;
    background-color: rgba(0, 0, 0, 0.70);
    height: 110vh;
    width: 110vw;
    overflow: hidden;
    z-index: 30;
    opacity: 0;
}

#spotlight-document {
    display: none;
    width: 80vw; height: 80vh;
    position: fixed; left: 10vw; top: 100vh;
    flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 40;
    border-radius: 0.5rem;
    background: #F4F1DE;
    overflow-x: hidden;
}

.spot-doc-link-wrap {
    height: 2.3rem;
    width: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #F4F1DE;
}

/* model */
.toggle_content {
    display: none;
    width: 100%;
    border: none;
    background-color: rgba(129, 178, 154, 0.22);
    padding: 14px 28px;
    font-family: "monospace";
    cursor: pointer;
    word-wrap: break-word;
    font-size: small;
}

.toggle_button {
    display: block;
    width: 100%;
    border: none;
    background-color: rgba(129, 178, 154, 0.84);
    text-align: left;
    box-shadow: 1px 2px 5px #777;
}

.bind_motif{
    background: rgba(242, 204, 143, 0.75);
}

#DNA_seq{
    text-align: center;
    font-family: "monospace";
}

.figure_description{
    font-size: small;
    color: #7a7a7a;
    padding: 9px 3px;
}
