@font-face {
  font-family: 'Poppins';
  src: url('https://static.igem.wiki/teams/5061/site-assets/poppins-regular.ttf');
}

:root {
  --font-titles: "Poppins";
  --font-body: "Poppins";
  --font-subtitles: "Poppins";
  --font-support: monospace;
  
  --amethyst: #9163CB;
  --deep-grey: #1A1A1A;
  --night: #142773;
  --teal: #428fa6ff;

  --gradient: linear-gradient(to top,     
    #f1ecfe 0%,     
    #eaacfb 10%,    
    #0936be 45%,     
    #000000 74% );
  --antigradient: linear-gradient(to bottom,     
    #f1ecfe 0%,     
    #eaacfb 10%,    
    #0936be 45%,     
    #000000 74% );
}

/* ============================================================== { RULES } ========== */

body {
  padding-top: 0px;
  background: black;
  background-size: contain;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

*::focus {
  outline: none !important;
  border: none !important;
}

.hidden {
  display: none;
}

.content.container:has(> #home-signature) ~ #buttons {
  display: none !important;
}

#buttons {
  position: fixed;
  bottom: 70px;
  right: 20px;            /* Adjust the right margin to control placement */
  display: flex;
  flex-direction: column; /* Stack buttons vertically */
  gap: 10px;              /* Space between buttons */
  outline: none;          /* Remove focus outline */
  width: 50px;            /* Allow the width to adjust naturally */
  height: 50px;           /* Allow the height to adjust naturally */
  overflow: visible;      /* Prevent clipping */
  z-index: 9999;          /* Ensure visibility above other elements */
}

@media all and (min-width: 100px) and (max-width: 900px) {
  #buttons {
    display: none !important; /* Hide on smaller screens */
  }
  .toc {
    display: none !important;
  }
}

#buttons button {
  background: transparent;    /* Ensure transparency if needed */
  border: none;               /* Remove borders */
  padding: 10px;              /* Padding for button size */
  border-radius: 5px;         /* Optional: Rounded corners */
  cursor: pointer;            /* Show pointer on hover */
  width: 40px;                /* Explicit width for uniformity */
  height: 40px;               /* Explicit height for uniformity */
}

/* ========================================================== { FOOTER } */

footer a { 
  position: relative; /* Needed for the ::after pseudo-element */
  color: white; /* Keep text color white */
  text-decoration: none; /* Remove the default underline */
  font-weight: bold; /* Optional: Make links bold for emphasis */
  transition: color 0.3s ease; /* Smooth color transition on hover */
}

/* Gradient underline effect */
footer a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px; /* Position slightly below the text */
  width: 0; /* Start with no underline */
  height: 3px; /* Thickness of the underline */
  background: linear-gradient(to right,     
    #f1ecfe 0%,     
    #eaacfb 10%,    
    #0936be 45%,     
    #000000 74% ); /* Gradient colors */
  transition: width 0.4s ease, background-position 0.4s ease; /* Smooth underline animation */
  background-size: 200%; /* Extend the gradient for animation */
  background-position: 0%; /* Start at the beginning of the gradient */
}

/* Hover state: expand the underline */
footer a:hover::after {
  width: 100%; /* Fully expand the underline */
}

footer {
  padding: 3rem;
  background-color: black !important; /* Retain black background */
}


/* ============================================================== { CONTENT } ========== */

.page-layout {
  display: flex;
}

.toc {
  position: fixed;
  top: 12%;
  left: 40px;
  width: 15%;
  max-height: 100vh;
  overflow-y: auto;
  padding: 15px;
  background: white;
  border-radius: 5px;
  opacity: 0;
  visibility: hidden;
  z-index: 97;
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc ul li {
  margin-bottom: 10px;
}

/* Base styles for TOC links */
.toc ul li a {
  position: relative;
  text-decoration: none; /* Remove default underline */
  color: #007BFF; /* Link color */
}

/* Add gradient underline using ::after pseudo-element */
.toc ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px; /* Position slightly below the text */
  width: 0; /* Start with no underline */
  height: 3px; /* Thickness of the underline */
  background: linear-gradient(to right,     
  #f1ecfe 0%,     
  #eaacfb 10%,    
  #0936be 45%,     
  #000000 74% ); /* Gradient colors */
  transition: width 0.4s ease, background-position 0.4s ease; /* Animate width and gradient */
  background-size: 200%; /* Make gradient larger to animate */
  background-position: 0%; /* Start at the beginning of the gradient */
}

/* Hover state to expand the underline with animated gradient */
.toc ul li a:hover::after {
  width: 100%; /* Extend the underline fully */
  /* background-position: 100%;  Shift the gradient to the right */
}

.content {
  flex: 1;
  padding: 20px;
}

/* Add spacing above headings for in-page navigation */
.content h1,
.content h2,
.content h3 {
  scroll-margin-top: 110px; /* Adjust this value to match the height of your navbar */
}

/* Styling for TOC links */
.toc a[data-level="h1"] {
  font-size: 1.2em; /* Larger font for H1 */
  font-weight: bold; /* Bold for emphasis */
  color: #000; /* Darker color */
  display: block; /* Ensure block-level layout */

}

.toc a[data-level="h2"] {
  font-size: 1em; /* Medium size for H2 */
  font-weight: normal;
  color: #555; /* Slightly lighter color */
  padding-left: 10px; /* Indentation to visually separate levels */
  text-indent: -10px; /* Negative indent to align wrapped lines */
  display: block; /* Ensure block-level layout */
}

.toc a[data-level="h3"] {
  font-size: 0.9em; /* Smaller font for H3 */
  font-weight: lighter;
  color: #777; /* Even lighter color */
  padding-left: 20px; /* More indentation for hierarchy */
  text-indent: -20px; /* Negative indent to align wrapped lines */
  display: block; /* Ensure block-level layout */
}


.content.container {
  border-radius: 15px;
  background: white;
  backdrop-filter: blur(10px);
  color: black;
  max-width: 90%;
  padding: 30px;
  overflow-y: scroll;
  max-height: calc(90% - 65px);
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
  margin-top: 10%;
}

.content.container p {
  text-align: justify;
  margin-bottom: 10px;
}

.content.container p:has(img), .content.container p.caption {
  text-align: justify;
  margin-bottom: 50px;
}

.content.container img.formula {
  max-height: 75px;
}

.content.container h1 {
  font-weight: bolder;
  font-size: 3em;
}

.content.container h1:not(.content.container > :first-child),
.content.container h2:not(.content.container > :first-child) {
  margin-top: 40px;
}

.content.container table {
  border: 1px solid black;
  border-collapse: collapse;
  margin: 20px auto;
}

.content.container table td, th {
  border: 1px solid black;
  padding: 5px;
}

.content.container > :first-child {
  margin-top: 0px !important;
}

.content.container a {
  color: var(--amethyst) !important;
}

.content.container > img,
.content.container p > img {
  max-width: 90%;
  max-height: 100vh;
  margin: 20px auto;
  display: block;
}

a.ref {
  color: black;
  display: inline-block;
  font-size: 0.7em;
  /* margin-bottom: 30px; */
  vertical-align: top;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}

.img-caption {
  display: flex;
  gap: 20px;
  height: fit-content;
  padding: 50px;
}

.img-caption > * {
  width: 50%;
}

.img-caption.img-right p {
  text-align: right;
}

.img-caption.img-center p {
  text-align: center;
}

.img-caption.img-center {
  flex-direction: column;
  align-items: center;
}

.img-caption.float-right { float: right; }
.img-caption.float-left { float: left; }

.img-caption.float-right,
.img-caption.float-left {
  width: 50%;
  padding: 0px 50px;
}

.img-caption.float-right.img-center > *,
.img-caption.float-left.img-center > * {
  width: 100%;
}

@media all and (min-width: 100px) and (max-width: 900px) {
  .content.container {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0px !important;
  }

  .img-caption {
    width: 100% !important;
    flex-direction: column !important;
    float: none !important;
    padding: 50px 0px !important;
  }

  /* Hide the TOC */
  .toc {
    display: none !important;
  }

  .img-caption > * {
    width: 100% !important;
    text-align: center !important;
  }
}


.image-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.image-container {
  text-align: center;
  width: 30%; /* Ensures three images fit on the same row */
}

.image-container img {
  max-width: 100%;
  height: auto;
  /* width: auto; */
  border-radius: 8px;
  /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/
}

.image-container p {
  margin-top: 10px;
  font-size: 16px;
  color: #333;
}

/* ============================================================== { AD / CD } ========== */

#seqan {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 15px;
  width: 70%;
  margin: auto;
}

#seqan img#seqan-logo {
  width: 100%;
}

fieldset, #seqan-res div:first-child {
  width: 100%;
  padding: 15px;
  border: 1px solid grey;
}

#seqan-input, #seqan-res {
  height: 150px;
  width: 100%;
  resize: none;
  padding: 10px;
}

*:focus {
  outline: none;
}

#seqan-res {
  cursor: default;
  font-family: monospace;
  overflow-x: scroll;
  overflow-y: hidden;
  height: 195px;
  padding: 0px;
  margin: 10px 0;
}

#seqan-res div {
  width: fit-content;
  padding: 10px;
  white-space: pre;
}

#seqan-res div:first-child {
  border: 1px solid grey;
}

#seqan-res .grey {
  opacity: 0.3;
}

@media all and (min-width: 100px) and (max-width: 900px) {
  #seqan {
    font-size: 0.6em;
  }

  #seqan fieldset {
    font-size: 0.9em;
  }

  #seqan-input, #seqan-res {
    width: 100% !important;
  }

  #seqan-res {
    height: 120px !important;
  }
}

#seqan button {
  background: linear-gradient(to top, #a84ac2, #0936be);
  color: white;
  border-radius: 5px;
  border: none;
  padding: 10px 20px;
  text-transform: uppercase;
}

/* ============================================================== { BOOTSTRAP } ========== */

button {
  background: var(--background-color);
  color: white;
  border-radius: 5px;
  border: none;
  padding: 10px 20px;
}

.btn.btn-primary {
  background: transparent;
  border: 2px solid var(--amethyst);
  color: var(--amethyst);
}

.left-aligned { margin-left: auto; }

.btn {
  font-family: monospace;
}

@media (prefers-reduced-motion: no-preference) {
  #main-hero img {
    animation: pop linear both;
    animation-timeline: view();
    animation-range: contain;
  }
}

@keyframes pop {
  from {
    transform: scale(0.7);
  }
  to {
    transform: scale(1);
  }
}

/* ============================================================== { HOMEPAGE } ========== */

.content.container:has(> #home-signature) {
  padding: 0px !important;
  max-width: 100vw !important;
  width: 100vw !important;
  border-radius: 0px !important;
  background: transparent;
  overflow: hidden;
  max-height: unset !important;
  margin-top: 0px !important;
}

.content.container:has(> #home-signature) .liquid {
  height: 100vh;
  width: 100%;
  object-fit: cover;
  background-position: bottom !important;
  background-size: cover !important;
  display: flex;
  justify-content: center; 
  align-items: center; 
  color: white;
  font-size: 3em;
  position: relative;
  filter: saturate(1);
  padding: 100px;              /* Add margin from the edges */
  box-sizing: border-box;     /* Ensure padding doesn't affect width/height */
}

.content.container:has(> #home-signature) .liquid h1 {
  position: absolute;
  bottom: 40%;
  font-size: 2em;
  font-weight: 700;
  letter-spacing: 15px;
  font-size: 1.5em;
}

@media all and (min-width: 100px) and (max-width: 900px) {
  .content.container:has(> #home-signature) .liquid h1 {
    font-size: 1.5em;
  }
}

.content.container:has(> #home-signature) .content {
  background: white;
  padding: 50px;
  max-width: 980px;
}

.wrapper {
  display: flex;
  width: auto; /* Make the width adapt to the content */
  max-width: 100%; /* Prevent it from exceeding the viewport width */
  height: 100%;
  overflow: hidden; /* Prevent content from spilling out */
  justify-content: center;
  background: white;
  padding: 75px 0;
}

.wrapper h2 {
  font-family: monospace;
  font-size: 1.5em;
}

.wrapper .content h3 {
  font-weight: 100;
  margin: 30px 0px;
}

#sponsors {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 25px;
}

#sponsors .sponsor {
  width: calc(calc(100% - 40px) / 3);
  background: whitesmoke;
  border-radius: 15px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#sponsors .sponsor img {
  height: 50%;
  filter: grayscale(1) contrast(1);
  mix-blend-mode: multiply;
  transition: all 200ms ease-in-out;
}

#sponsors .sponsor:hover img {
  filter: none;
}

@media all and (min-width: 100px) and (max-width: 900px) {
  #sponsors .sponsor img {
    width: 75%;
    height: unset;
  }
}

#sponsors .sponsor img.h {
  width: 75%;
  height: unset;
}

#sponsors .sponsor img.h.w {
  width: 60%;
}

.video-wrapper {
  width: 100%;
  margin: 75px auto;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 15px;
  position: relative;
  overflow: clip;
  z-index: 98;
}

#center-logo {
  width: 25%;
  filter: drop-shadow(0 0 70px black);
  max-width: 500px;
}

/* ============================================================== { MOLSTAR } ========== */

.protein {
  width: 800px; 
  height: 600px; 
  position: relative;
}

/* ============================================================== { TEAM } ========== */

#team-list {
  --n: 5;
  --p: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--p);
}

#team-list .member {
  aspect-ratio: 52 / 74;
  border-radius: 15px;
  overflow: clip;
  background: whitesmoke;
  position: relative;
  color: white;
  width: calc(calc(100% - calc(var(--n) * var(--p))) / var(--n));
  cursor: pointer;
  font-size: 0.7em;
}

#team-list .member img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 200ms ease-in-out;
}

#team-list .member span {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#team-popup {
  position: absolute;
  width: 500px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  z-index: 98;
  backdrop-filter: blur(10px);
  border-radius: 15px;
  margin: 0 10px;
}

#team-popup .keywords {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0;
}

#team-popup .close-btn {
  color: black !important;
}

#team-popup .keywords .tag {
  padding: 5px 10px;
  background: black;
  color: white;
  font-size: 0.7em;
  border-radius: 50px;
}

#team-popup .name {
  font-weight: bold;
  font-size: 2em;
}

#team-list .pname {
  font-weight: bold;
  font-size: 2em !important;
  bottom: 34px !important;
}

#splash {
  background: black;
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 99;
  left: 0;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  opacity: 1;
  transition: none;
  flex-direction: column;
  gap: 10px;
}

#splash.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}

#splash img {
  filter: brightness(0) invert(1);
  width: 75px;
  animation: spin infinite 5s linear;
  transition: opacity 50ms;
}

#splash.hidden img {
  opacity: 0;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}