/* == FONTS == */

/* rajdhani-regular - latin */
@font-face {
  font-display: swap; 
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 400;
  src: url('https://static.igem.wiki/teams/5571/fonts/rajdhani-v16-latin-regular.woff2') format('woff2'); 
}
/* rajdhani-600 - latin */
@font-face {
  font-display: swap; 
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  src: url('https://static.igem.wiki/teams/5571/fonts/rajdhani-v16-latin-600.woff2') format('woff2'); 
}

/* space-grotesk-regular - latin */
@font-face {
  font-display: swap; 
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  src: url('https://static.igem.wiki/teams/5571/fonts/space-grotesk-v21-latin-regular.woff2') format('woff2'); 
} 

/* space-grotesk-500 - latin */
@font-face {
  font-display: swap; 
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  src: url('https://static.igem.wiki/teams/5571/fonts/space-grotesk-v21-latin-500.woff2') format('woff2'); 
}
/* space-grotesk-300 - latin */
@font-face {
  font-display: swap;
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300;
  src: url('https://static.igem.wiki/teams/5571/fonts/space-grotesk-v21-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: "Saira Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://static.igem.wiki/teams/5571/fonts/saira-condensed-v11-latin-regular.woff2') format('woff2');
}

/* rubik-regular - latin */
@font-face {
  font-display: swap; 
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  src: url('https://static.igem.wiki/teams/5571/fonts/rubik-v30-latin-regular.woff2') format('woff'); 
}

/* === RESET AND BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === TOKENS === */
:root {
  --dark-bg: #141212;
  --page-bg: #000;
  --light-text: #f7efe7;
  --warm-orange: #dc724b;
  --red-orange: #c83a07;
  --navbar-bg: #0f1423;
  --navbar-border: #0c2d48;
  --section-bg-1: rgba(220, 114, 75, 0.75); /* or 0.5 */
  --section-bg-2: rgba(255, 255, 255, 0.1);
  --section-bg-3: rgba(91, 192, 222, 0.2);
  --section-bg-4: rgba(221, 184, 108, 0.15);
  --body-weight: 300;

  --body-size: 16px;
  --max-content: 1100px;

  --glow: 0 0 40px rgba(220,114,75,0.35);
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--page-bg);
  color: var(--light-text);
  font-family: 'Space Grotesk', 'Inter', 'Saira Condensed', sans-serif;
  font-size: var(--body-size);
  line-height: 1.6;

  /* smoothing for lighter-looking text */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* OPTIONAL: only if your Space Grotesk is variable */
  /* font-variation-settings: "wght" 330; */
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 3rem); }
h3 { font-size: 1.6rem; }
p  { font-size: 1.2rem; }
li {font-size: 1.2rem; }

/* Lighter body copy across the site */
p,
li,
td,
th,
small,
label,
blockquote,
figcaption {
  font-weight: var(--body-weight);
  letter-spacing: 0.005em; /* subtle breathing room */
}

.header-video {
  position: relative;
  height: 100vh;     /* Or a fixed height like 600px */
  overflow: hidden;
  z-index: 0;
}

.header-video video {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  z-index: 1;
}

.header-video .twinkling-stars {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}


/* === PAGE SECTIONS === */
.parallax-section {
  position: relative;
  width: 100%;
  min-height: unset !important;
  padding: 1rem 0 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
}
.parallax-section:nth-of-type(even) {
  background-color: rgba(0,0,0,0.25);
}

.section-text {
  max-width: 800px;
  padding: 1.2rem 1.2rem !important;
  margin: 0 auto !important;
  border: none;
  box-shadow: none;
  z-index: 2;
  text-align: left;
}

/* === SIDE LAYOUTS === */
.side-layout {
  display: flex;
  flex-direction: row;      /* left to right */
  flex-wrap: nowrap;        /* keep them side by side */
  align-items: flex-start;
  justify-content: space-between;
  max-width: var(--max-content);
  margin: 0 auto !important;
  padding: 0.5rem 0 !important;
  gap: 2rem;
  z-index: 2;
}
.side-layout.reverse {
  flex-direction: row-reverse;
}
.side-layout iframe {
  flex: 1 1 350px;
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 1rem;
  box-shadow: none;
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.side-text {
  flex: 1 1 350px;
  background: transparent;
  padding: 2rem;
  border: none;
  box-shadow: none;
}

/* === SECTION TRANSITION === */
.section-transition {
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0,0,0,0), var(--page-bg));
  margin-top: -100px;
  z-index: 1;
  position: relative;
}

/* === BACK TO TOP BUTTON === */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  display: none;
  cursor: pointer;
  z-index: 1000;
  transition: opacity 0.3s ease;
  margin-bottom: 100px;
}
#back-to-top:hover {
  opacity: 0.8;
}
@keyframes rocket-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* === FADE-IN === */
body { opacity: 0; transition: opacity 0.4s ease; }
body.loaded { opacity: 1; }

/* === AOS === */
[data-aos] {
  transition-property: transform, opacity !important;
  will-change: transform, opacity;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .side-layout { flex-direction: column; }
  .section-text { text-align: left; }
}

.side-text ul {
  padding-left: 1.5rem;  /* adds space between bullets and text */
  margin: 1rem 0;        /* spacing above/below the list */
  list-style-position: outside;  /* ensures bullets sit outside the text block */
}

.side-text {
  flex: 1 1 350px;
  background: transparent;
  padding: 2rem;
  border: none;
  box-shadow: none;
}

/* === SECTION TRANSITION === */
.section-transition {
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0,0,0,0), var(--page-bg));
  margin-top: -100px;
  z-index: 1;
  position: relative;
}

.side-text ul {
  list-style-type: disc;
  list-style-position: inside;
  padding-left: 0;
  margin: 1rem 0;
}

.side-text li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  padding-left: 0.75rem;
  text-indent: -0.75rem;
}
.side-layout iframe {
  flex: 1 1 50%;
  order: 1;
}

.side-layout .side-text {
  flex: 1 1 50%;
  order: 2;
}
/* === NAVIGATION === */
header .navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  min-height: 12vh;
  z-index: 10;
  background: var(--navbar-bg);
  border-bottom: 2px solid var(--navbar-border);
}

.navigation .logo {
  margin-left: 20px;
}
.navigation .logo h1 {
  color: var(--text-blue);
  font-size: 30px;
}

.navigation .menu-list {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 45%;
  margin: auto 20px auto 0;
  transition: all 0.3s ease;
}
.menu-list li a {
  color: var(--text-blue);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.navigation .humbarger {
  display: none;
  margin-right: 20px;
}
.humbarger .bar {
  width: 30px;
  height: 2px;
  margin: 7px;
  background: var(--text-blue);
}

/* === PROGRESS BAR === */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0%;
  background-color: rgb(181, 81, 23);
  z-index: 9999;
  transition: width 0.25s ease-out;
}
.navbar-hidden {
  top: -100px !important;
  transition: top 0.4s;
}
/* === TRANSPARENT FLOATING SIDEBAR === */
.scroll-sidebar {
  position: fixed;
  top: 10%; /* appears after navbar */
  left: 0;
  padding: 10px 0;
  width: 180px; /* narrow bar */
  z-index: 1000;
  justify-content: left;

  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;

  font-family: 'Saira Condensed', sans-serif;
  font-size: 1rem;
  color: white;
  user-select: none;
  pointer-events: auto;

  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Show sidebar after scrolling down 150px */
body.scrolled .scroll-sidebar {
  opacity: 1;
  transform: translateX(0);
}

.scroll-sidebar ul {
  margin: 0;
  list-style-image: url(https://static.igem.wiki/teams/5571/images/icons/bp2.svg);
}

.scroll-sidebar li {
  margin-bottom: 10px;
}

.scroll-sidebar a {
  color: var(--warm-orange);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.scroll-sidebar a:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 123, 0, 0.9);
}

.scroll-sidebar ul ul.sub-links {
  margin-left: 15px;
  font-size: 0.9rem;
  color: #aaa;
}
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === RESPONSIVE === */
@media (max-width: 991px) {
  .experiment-wrapper {
  display: block;
  gap: 2rem;
  width: 100%;
  margin: 0 auto;
  padding: 6rem;
}
  .scroll-sidebar {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    animation: none;
    margin-bottom: 20px;
  }
  .content-box {
  max-width: var(--max-content);
  margin: 2rem auto;
  padding: 2rem;
  text-align: left;
}
}
footer, #footer, .mw-footer {
  background-color: white !important;
  color: #333 !important;
  padding: 40px 16px;
  text-align: center;
  font-size: 16px;
}
footer {
  position: relative;
  z-index: 10;
}
footer.footer {
  color: black !important;
}

footer.footer a {
  color: black !important;
}
footer.footer svg path {
  fill: var(--warm-orange) !important;
}
/* Make sure header/footer/content appear ABOVE stars */
header, footer {
  position: relative;
  z-index: 10;
}

main {
  display: block;
  position: relative;
  z-index: 5;
  min-height: 100vh; /* TEMPORARY for testing scroll */
  padding-bottom: 4rem; 
  margin-top: 50px;
}
/* === Twinkling Stars === */
.twinkling-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0; /* ← WAS -10, too far behind everything */
}

.twinkling-stars .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  animation: twinkle 2s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}
body {
  position: relative;
}
.header-fadeout {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--page-bg));
  z-index: 5; /* just above video and stars, below any nav or content */
  pointer-events: none;
}
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.flip-card {
  background: transparent;
  width: 300px;
  height: 400px;
  perspective: 1000px;
  cursor: pointer;
}

.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-inner,
.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-color: var(--dark-bg);
  border: 1px solid var(--warm-orange);
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(255, 123, 0, 0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flip-front img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.flip-front h3, .flip-front p {
  color: var(--light-text);
  text-align: center;
}

.flip-back {
  transform: rotateY(180deg);
  color: var(--light-text);
  text-align: left;
  overflow-y: auto;
}

.flip-back ul {
  padding-left: 1rem;
  font-size: 0.9rem;
}

.read-more {
  margin-top: 1rem;
  background: var(--warm-orange);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.card-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.impact-card:hover {
  transform: scale(1.03);
}

.impact-card h3 {
  color: var(--warm-orange);
  margin-bottom: 0.5rem;
}

.impact-card p {
  font-size: 0.95rem;
  color: var(--light-text);
}

.card-safety {
  border-color: #dc724b;
}

.card-modeling {
  border-color: #5bc0de;
}

.card-design {
  border-color: #ddb86c;
}
.section-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem; /* consistent spacing */
  align-items: flex-start;
}

.section-header {
  flex: 1 1 300px;
}

.section-header h2 {
  color: var(--warm-orange);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--light-text);
  font-size: 1rem;
  line-height: 1.6;
}

.section-cards {
  flex: 2 1 600px;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.impact-card {
  position: relative;
  width: 100%;
  max-width: 300px;
  background-color: rgba(20, 20, 20, 0.95);
  padding: 3rem 1.2rem 1.2rem 1.2rem; /* extra top space */
  border-radius: 1rem;
  border: 2px solid transparent;
  box-shadow: 0 0 20px rgba(255, 123, 0, 0.05);
  transition: transform 0.3s ease;
  text-align: left;
  overflow: visible; /* ensure badge overflows */
  z-index: 1;
}

.impact-card:hover {
  transform: translateY(-5px);
}

.card-badge {
  position: absolute;
  top: -45px;
  left: 10px;
  width: 100px;
  height: 80px;
  background: var(--warm-orange);
  border-radius: 50% / 60%; /* elliptical UFO body */
  box-shadow: 0 10px 20px rgba(255, 123, 0, 0.4);
  z-index: 11;
}

.card-badge img {
  display: none;
}


.card-safety { border-color: #dc724b; }
.card-modeling { border-color: #5bc0de; }
.card-design { border-color: #ddb86c; }

.section-grid.reverse {
  flex-direction: row-reverse;
}

.scroll-sidebar a::before {
  display: inline-block;
  margin-right: 8px;
  color: var(--warm-orange); /* or white, or #aaa */
  transition: transform 0.2s ease;
}

.scroll-sidebar a:hover::before {
  transform: translateX(3px);
}

.scroll-sidebar li {
  margin-top: 2px;
}

.experiment-section {
  padding: 3rem 2rem;
  margin: 3rem auto;
  max-width: 75%; /* centers each block */
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: unset;
}

/* Alternating accordion colors */
.accordion-item:nth-child(odd) .accordion-button {
  background-color: var(--warm-orange);
  color: #fff;
}

.accordion-item:nth-child(even) .accordion-button {
  background-color: #fff;
  color: #000;
}
.accordion-button {
  background-color: transparent;
  color: inherit;
}
.accordion-button::after {
  transition: transform 0.3s ease;
  transform: scale(0.5)
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}
.bg-1 { background-color: var(--section-bg-1); }
.bg-2 { background-color: var(--section-bg-2); }
.bg-3 { background-color: var(--section-bg-3); }
.bg-4 { background-color: var(--section-bg-4); }