:root {
  /* ---------- Raw palette ---------- */
  --purple-100: #E4CAFF;
  --purple-200: #D2CBF7;
  --purple-300: #C7A1EF;
  --purple-400: #A66CE2;
  --purple-500: #912CF7;
  --purple-600: #7E00FF;
  --purple-700: #634BE0;
  --purple-800: #3C19F3;
  --purple-900: #2E1D86;


  --deep-purple: #190F4F;


  --white: #ffffff;
  --black: #000000;


  --info:    #5bc0de;
  --warning: #f0ad4e;
  --danger:  #d9534f;


  /* ---------- Theme ---------- */
  --color-bg:       #FBFDFF;  
  --color-bg-dark:  #21172C;

  --color-bg-hp:       #FFFFFF;   /* only for homepage light */
  --color-bg-dark-hp:  #000037 ;   /* only for homepage dark */

/* ---------- Text updated ---------- */
  --color-text:     #190F4F;
  --color-title:    #634BE0;

  --color-title-dark: #C7A1EF;
  --color-title-light: #634BE0;

  --color-text-dark: #D2CBF7;
  --color-text-light: #190F4F;


/* ---------- Other---------- */

  --color-surface:  #F6EDFF;
  --color-border:   #D2CBF7;


  --color-link:       #634BE0;
  --color-link-hover: #3C19F3;
  --color-footer-bg-light: #B8AAEE;
  --color-footer-bg-dark:  #331B86; 


  --color-navbar-bg:    var(--deep-purple);
  --color-hero-bg:      var(--purple-600);


  --color-text-muted:   var(--purple-400);
  --color-text-body:    var(--color-text);


  --color-accent:       var(--purple-700);
  --color-accent-hover: var(--purple-800);


  --color-border-soft:  var(--color-border);


  /* --color-footer-text:  var(--white); */
    --color-footer-text:  var(--deep-purple); 
}

/* FONT */
:root { --bs-body-font-family: Helvetica, Arial, sans-serif; }


:root[data-theme="dark"] {
  --color-bg: var(--color-bg-dark);
  --color-footer-text: var(--white);
}


body { background-color: var(--color-bg); }
.left-aligned { margin-left: auto; }
.bg-dark { background-color: var(--color-navbar-bg) !important; }
.bg-hero { background-color: var(--color-hero-bg); }


/* CALLOUT */
.bd-callout { padding: 1.25rem; margin-top: 1.25rem; margin-bottom: 1.25rem; border: 1px solid var(--color-border); border-left-width: .25rem; border-radius: .25rem; }
/* .bd-callout { padding:1.25rem; margin-top:1.25rem; margin-bottom:1.25rem; border:1px solid #e9ecef; border-left-width:.25rem; border-radius:.25rem } */
.bd-callout h4 { margin-bottom: 1.25rem }
.bd-callout p:last-child { margin-bottom:0 }
.bd-callout code { border-radius:.25rem }
.bd-callout+.bd-callout { margin-top:-.25rem }
.bd-callout-info { border-left-color:var(--info); }
.bd-callout-warning { border-left-color: var(--warning);}
.bd-callout-danger { border-left-color: var(--danger); }


/* THEME TOGGLE: tall rounded button (the accessibility button keeps no background) */
.nav-theme[data-theme-toggle] {
  width: 46px;
  height: 62px;
  padding: 6px;
  border-radius: 16px;
  background: #f3f0fc;
  box-shadow: 0 4px 14px rgba(40, 30, 80, .22);
}
.nav-theme[data-theme-toggle] img { height: 48px; width: auto; max-width: 100%; }

:root[data-theme="dark"] .nav-theme[data-theme-toggle] {
  background: #1c1640;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}

/* keep it visible in the accessibility high-contrast mode */
:root.a11y-contrast[data-theme] .nav-theme[data-theme-toggle] { background: #000; box-shadow: 0 0 0 1px #fff; }

/* NAV BUTTONS (shared by the accessibility button and the theme toggle) */
.nav-theme {
  flex: none;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  color: var(--nav-ink);
  transition: transform .2s ease;
}
.nav-theme:hover { transform: translateY(-1px); }
.nav-theme:focus-visible { outline: 2px solid var(--nav-active-bg); outline-offset: 2px; }
.nav-theme img { height: 4rem; width: auto; display: block; object-fit: contain; }
.nav-theme .icon-dark { display: none; }
:root[data-theme="dark"] .nav-theme .icon-light { display: none; }
:root[data-theme="dark"] .nav-theme .icon-dark  { display: block; }

/* ICHNOS LOGO */
/* LOGO: one version per theme */
.nav-logo .logo-dark { display: none; }
:root[data-theme="dark"] .nav-logo .logo-light { display: none; }
:root[data-theme="dark"] .nav-logo .logo-dark  { display: block; }

/* NAVIGATION BAR */
/* ============ FLOATING GLASS NAV ============ */
:root {
  --nav-top: 1rem;
  --nav-h: 3.5rem;
  --nav-gap: .75rem;

  --nav-glass-bg:     rgba(255, 255, 255, .72);
  --nav-glass-brd:    rgba(255, 255, 255, .62);
  --nav-glass-shadow: 0 10px 34px rgba(25, 15, 79, .14), 0 2px 8px rgba(25, 15, 79, .07);

  --nav-ink:        #190F4F;
  --nav-hover-bg:   rgba(99, 75, 224, .10);
  --nav-active-bg:  #634BE0;
  --nav-active-ink: #FFFFFF;

  --nav-menu-bg:    rgba(255, 255, 255, .88);
  --nav-menu-brd:   rgba(99, 75, 224, .16);
}

  :root[data-theme="dark"] {
  --nav-glass-bg:     rgba(40, 14, 67, .62);
  --nav-glass-brd:    rgba(210, 203, 247, .18);
  --nav-glass-shadow: 0 10px 34px rgba(0, 0, 0, .45);
  --nav-ink:        #D2CBF7;
  --nav-hover-bg:   rgba(210, 203, 247, .12);
  --nav-active-bg:  #912CF7;
  --nav-menu-bg:    rgba(40, 14, 67, .90);
  --nav-menu-brd:   rgba(210, 203, 247, .16);
}

/* The bar floats over the hero, so the hero carries the clearance. */
body { padding-top: 0; }
.bg-hero { padding-top: calc(var(--nav-top) + var(--nav-h) + 3.5rem) !important; }
html { scroll-padding-top: calc(var(--nav-top) + var(--nav-h) + 1.5rem); }
.spy-section { scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 1.5rem); }

.floating-nav {
  position: fixed;
  top: var(--nav-top);
  left: 0; right: 0;
  z-index: 1030;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  pointer-events: none;
}
.floating-nav__inner {
  position: relative;
  /* max-width: 1280px; */
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}
.floating-nav__inner > * { pointer-events: auto; }

.nav-pill {
  background: var(--nav-glass-bg);
  border: 1px solid var(--nav-glass-brd);
  border-radius: 999px;
  box-shadow: var(--nav-glass-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
          backdrop-filter: blur(16px) saturate(180%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --nav-glass-bg: rgba(255,255,255,.94); --nav-menu-bg: rgba(255,255,255,.98); }
  :root[data-theme="dark"] { --nav-glass-bg: rgba(40,14,67,.94); --nav-menu-bg: rgba(40,14,67,.98); }
}

/* Logo */
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  /* height: var(--nav-h); */
  flex: none;
  text-decoration: none;
  color: var(--nav-ink);
  transition: transform .2s ease;
}

.nav-logo:hover { color: var(--nav-ink); transform: translateY(-1px); }
.nav-logo img { height: 6rem; width: auto; display: block; }  /*logo size*/
.nav-logo__word { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; line-height: 1; white-space: nowrap; }

/* Links pill — no overflow:hidden, it would clip the dropdowns */
.nav-pill {
  flex: 0 1 auto;
  margin-inline: auto; 
  min-width: 0;
  height: var(--nav-h);
  padding: 0 5rem;
  display: flex;
  align-items: center;
}
.nav-pill .navbar-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  flex-wrap: nowrap;
}
.nav-pill .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .5rem .95rem;
  border-radius: 999px;
  color: var(--nav-ink);
  font-weight: 500;
  font-size: .95rem;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease;
}

.nav-pill .nav-link:hover,
.nav-pill .nav-link:focus-visible { background: var(--nav-hover-bg); color: var(--nav-ink); }

/* category icons in the nav: one version per theme */
.nav-ico { height: 2rem; width: auto; display: block; flex: none; }
.nav-ico-dark { display: none; }
:root[data-theme="dark"] .nav-ico-light { display: none; }
:root[data-theme="dark"] .nav-ico-dark  { display: block; }
.nav-pill .nav-item.show > .nav-link { background: var(--nav-hover-bg); }

.nav-pill .nav-link.active,
.nav-pill .nav-link[aria-current="page"] {
  background: var(--nav-active-bg);
  color: var(--nav-active-ink);
  box-shadow: 0 4px 14px rgba(99, 75, 224, .35);
}
.nav-pill .nav-link.active:hover { color: var(--nav-active-ink); }

.nav-pill .dropdown-toggle::after {
  margin-left: .1rem;
  border-top-width: .32em; border-right-width: .28em; border-left-width: .28em;
  opacity: .55;
  transition: transform .18s ease;
}
.nav-pill .nav-item.show > .dropdown-toggle::after { transform: rotate(180deg); }

/* Dropdowns */
.floating-nav .dropdown-menu {
  margin-top: .6rem;
  padding: .4rem;
  min-width: 100%;
  width: max-content;
  border: 1px solid var(--nav-menu-brd);
  border-radius: 1rem;
  background: var(--nav-menu-bg);
  box-shadow: var(--nav-glass-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
          backdrop-filter: blur(16px) saturate(180%);
}
.floating-nav .dropdown-item {
  border-radius: .65rem;
  padding: .5rem .8rem;
  font-size: .92rem;
  color: var(--nav-ink);
  white-space: normal;
}
.floating-nav .dropdown-item:hover,
.floating-nav .dropdown-item:focus { background: var(--nav-hover-bg); color: var(--nav-ink); }
.floating-nav .dropdown-divider { margin: .35rem .5rem; border-top-color: var(--nav-menu-brd); }

/* DROPDOWN: items appear one by one */
@keyframes dropdown-item-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.floating-nav .dropdown-menu.show > li {
  animation: dropdown-item-in .35s cubic-bezier(.2, .7, .2, 1) both;
}
.floating-nav .dropdown-menu.show > li:nth-child(1) { animation-delay: .04s; }
.floating-nav .dropdown-menu.show > li:nth-child(2) { animation-delay: .09s; }
.floating-nav .dropdown-menu.show > li:nth-child(3) { animation-delay: .14s; }
.floating-nav .dropdown-menu.show > li:nth-child(4) { animation-delay: .19s; }
.floating-nav .dropdown-menu.show > li:nth-child(5) { animation-delay: .24s; }
.floating-nav .dropdown-menu.show > li:nth-child(6) { animation-delay: .29s; }

@media (prefers-reduced-motion: reduce) {
  .floating-nav .dropdown-menu.show > li { animation: none; }
}

/* Burger */
.nav-pill .navbar-toggler {
  margin-left: auto;
  border: 0;
  padding: .45rem;
  border-radius: 999px;
  color: var(--nav-ink);
  box-shadow: none;
}
.nav-pill .navbar-toggler:focus { box-shadow: none; }
.nav-pill .navbar-toggler:hover { background: var(--nav-hover-bg); }
.nav-pill .navbar-toggler svg { display: block; width: 1.4rem; height: 1.4rem; }

/* Under 992px */
@media (max-width: 991.98px) {
  :root { --nav-h: 3.25rem; }

  .nav-pill { position: static; flex: 0 0 auto; margin-inline: auto 0; padding: 0 .35rem; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-logo img { height: 3.5rem; }
  .nav-logo__word { font-size: 1.05rem; }

  .floating-nav .navbar-collapse {
    position: absolute;
    top: calc(100% + .6rem);
    left: 0; right: 0;
    padding: .5rem;
    max-height: calc(100dvh - var(--nav-h) - 3rem);
    overflow-y: auto;
    background: var(--nav-menu-bg);
    border: 1px solid var(--nav-menu-brd);
    border-radius: 1.25rem;
    box-shadow: var(--nav-glass-shadow);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
            backdrop-filter: blur(16px) saturate(180%);
  }
  .floating-nav .navbar-nav { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav-pill .nav-link { width: 100%; justify-content: flex-start; padding: .65rem .9rem; }
  .nav-pill .nav-link.dropdown-toggle::after { margin-left: auto; }

    .floating-nav .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: auto;
    margin: .1rem 0 .35rem .75rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
  }
  .floating-nav .dropdown-item { padding-block: .55rem; }

    /* buttons: smaller on phones */
  .nav-theme img { height: 2.75rem; }
  .nav-theme[data-theme-toggle] { width: 34px; height: 46px; padding: 4px; border-radius: 12px; }
  .nav-theme[data-theme-toggle] img { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-logo, .nav-pill .nav-link, .floating-nav .dropdown-toggle::after { transition: none; }
}

/* FOOTER */
.footer-logo { height: 9rem; width: auto; display: block; }
:root:not([data-theme="dark"]) .footer-logo { filter: invert(1) hue-rotate(180deg); }

.footer-social a { display: block; transition: transform .2s ease; }
.footer-social a:hover { transform: translateY(-2px); }
.footer-social img { height: 2rem; width: auto; display: block; }

/* light icons by default, dark icons in dark mode */
:is(.footer-social, .footer-contact) .icon-dark { display: none; }
:root[data-theme="dark"] :is(.footer-social, .footer-contact) .icon-light { display: none; }
:root[data-theme="dark"] :is(.footer-social, .footer-contact) .icon-dark  { display: block; }

.footer-contact li { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.footer-contact img { width: 1.1rem; height: 1.1rem; flex: none; object-fit: contain; }.footer-contact a { font-weight: normal; }

/* FOOTER POLISH */
.footer {
  padding-top: 1.5rem !important;
  padding-bottom: .75rem !important;
  margin-top: 1rem !important;
  background-color: var(--color-footer-bg-light) !important;
  color: var(--color-footer-text) !important;
}
:root[data-theme="dark"] .footer { background-color: var(--color-footer-bg-dark) !important; }

/* small uppercase headings with an accent underline */
.footer-heading {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-footer-text);
  margin: 0 0 .6rem;         
}
.footer-heading::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-top: .4rem;
  border-radius: 2px;
  background: #912CF7;
}

/* social icons */
.footer-social { margin-top: .25rem !important; }
.footer-social img { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }

/* contact lines */
.footer p { margin-bottom: .6rem; }
.footer-row p { color: color-mix(in srgb, var(--color-footer-text) 85%, transparent); }
.footer hr { border-color: color-mix(in srgb, var(--color-footer-text) 25%, transparent); opacity: 1; margin-top: 0.75rem; }
.footer small { color: color-mix(in srgb, var(--color-footer-text) 70%, transparent); }

/* footer */
/* footer a { color: white; font-weight: bold; text-decoration: none; }
footer a:hover { color: white; text-decoration: underline; } */
footer a { color: var(--color-footer-text); font-weight: bold; text-decoration: none; }
footer a:hover { color: var(--color-footer-text); text-decoration: underline; }
@media (max-width: 575.98px) {
  .footer-logo { height: 5.5rem; }
  .footer-heading { font-size: 1.05rem; margin-bottom: .4rem; }
  .footer-heading::after { margin-top: .3rem; }
  .footer p { margin-bottom: .35rem; }
  .footer-contact li { margin-bottom: .35rem; }
  .footer-social img { height: 1.75rem; }
}


/* SPONSOR SECTION */
@keyframes sponsor-scroll{
  from{ transform:translateX(0); }
  to  { transform:translateX(-50%); }
}

.sponsor-marquee{
  overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);
          mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);
}

.sponsor-track{
  display:flex;
  padding:.5rem 0;
  width:max-content;
  animation:sponsor-scroll 35s linear infinite;
}
.sponsor-item{
  flex:0 0 200px;
  display:flex; align-items:center; justify-content:center;
  padding:0 .3rem;
  box-sizing:border-box;
}

.sponsor-item img{
  width:100%;
  max-width:180px;   /* was 300px */
  margin:0 auto;
  height:110px;      /* was 120px */
  object-fit:contain;
  background:#fff;
  border-radius:12px;
  padding:.3rem;  
  box-sizing:border-box;
  display:block;
}

@media (hover:hover){
  .sponsor-marquee:hover .sponsor-track{ animation-play-state:paused; }
}

@media (max-width: 991.98px){
  .sponsor-item{ flex-basis:170px; }
  .sponsor-item img{ max-width:150px; height:90px; }
}

@media (max-width: 575.98px){
  .sponsor-item{ flex-basis:140px; }
  .sponsor-item img{ max-width:130px; height:80px; padding:.6rem; }
}

@media (prefers-reduced-motion: reduce){
  .sponsor-track{ animation:none; }
  .sponsor-item{ flex:0 0 auto; }
  .sponsor-item img{ width:auto; min-width:160px; }
  .sponsor-marquee{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
}

/* ===== Safety & Security page ===== */
html { scroll-behavior: smooth; }
.spy-section { scroll-margin-top: 90px; padding-bottom: 2.5rem; }
.section-label { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--color-text-muted); margin-bottom: .25rem; }


.toc-sticky { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: .5rem; }
#safety-toc a { display: block; padding: .3rem 0 .3rem .75rem; color: var(--color-text-body); text-decoration: none; border-left: 3px solid transparent; }
#safety-toc a:hover { color: var(--color-accent-hover); }
#safety-toc a.active { color: var(--color-accent); font-weight: 600; border-left-color: var(--color-accent); }
#safety-toc .toc-sub { margin-left: .75rem; font-size: .9rem; }
#safety-toc .toc-subsub { margin-left: 1.5rem; font-size: .85rem; }


.draft-notes { border: 1px dashed var(--color-border-soft); background: var(--color-surface); border-radius: .5rem; padding: 1rem 1.25rem; color: var(--color-text-body); }
.draft-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted); font-weight: 600; }
.phase-card { border: 1px solid var(--color-border); border-radius: .5rem; padding: 1rem; height: 100%; }
.phase-tag { font-size: .75rem; letter-spacing: .08em; color: var(--color-accent); font-weight: 600; text-transform: uppercase; }

/* BACK TO TOP */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;              /* sits above the accessibility button */
  z-index: 1030;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top img { width: 3rem; height: 3rem; object-fit: contain; display: block; }

/* light image by default, dark image in dark mode */
.back-to-top .btt-dark { display: none; }
:root[data-theme="dark"] .back-to-top .btt-light { display: none; }
:root[data-theme="dark"] .back-to-top .btt-dark  { display: block; }

/* Accessibility button */

/* ============ ACCESSIBILITY ============ */


/* --- fonts: upload the two .woff2 files to static.igem.wiki and paste their URLs --- */
@font-face {
  font-family: "OpenDyslexic";
  src: url("https://static.igem.wiki/teams/6459/wiki/home-page/buttons/accessibility/opendyslexic-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("https://static.igem.wiki/teams/6459/wiki/home-page/buttons/accessibility/opendyslexic-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --- panel --- */
.a11y-panel {
  position: absolute;
  top: calc(100% + .6rem);
  right: 0;
  width: min(21rem, 100%);
  padding: .9rem;
  color: var(--nav-ink);
  background: var(--nav-menu-bg);
  border: 1px solid var(--nav-menu-brd);
  border-radius: 1.25rem;
  box-shadow: var(--nav-glass-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
          backdrop-filter: blur(16px) saturate(180%);
}
.a11y-panel__title { padding: .2rem .75rem .6rem; font-weight: 700; font-size: 1rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; padding: .4rem .75rem; font-size: .92rem; }
.a11y-stepper { display: flex; align-items: center; gap: .5rem; }
.a11y-stepper output { min-width: 3rem; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.a11y-stepper button {
  width: 2.2rem; height: 2.2rem; padding: 0;
  border: 1px solid var(--nav-menu-brd); border-radius: 50%;
  background: transparent; color: inherit; font-weight: 700; cursor: pointer;
}
.a11y-stepper button:hover:not(:disabled) { background: var(--nav-hover-bg); }
.a11y-stepper button:disabled { opacity: .35; cursor: default; }

.a11y-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: .6rem .75rem;
  border: 0; border-radius: .75rem;
  background: transparent; color: inherit;
  font-size: .92rem; text-align: left; cursor: pointer;
}
.a11y-opt:hover { background: var(--nav-hover-bg); }
.a11y-switch { position: relative; flex: none; width: 2.4rem; height: 1.35rem; border-radius: 99px; background: rgba(127,127,127,.4); transition: background-color .18s ease; }
.a11y-switch::after { content: ""; position: absolute; top: .17rem; left: .17rem; width: 1.01rem; height: 1.01rem; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.a11y-opt[aria-pressed="true"] .a11y-switch { background: var(--nav-active-bg); }
.a11y-opt[aria-pressed="true"] .a11y-switch::after { transform: translateX(1.05rem); }

.a11y-reset { display: block; margin: .5rem .75rem .1rem auto; padding: .3rem .8rem; border: 1px solid var(--nav-menu-brd); border-radius: 99px; background: transparent; color: inherit; font-size: .82rem; cursor: pointer; }
.a11y-reset:hover { background: var(--nav-hover-bg); }

.a11y-panel button:focus-visible,
.nav-theme:focus-visible { outline: 2px solid var(--nav-active-bg); outline-offset: 2px; }

/* --- text size --- */
:root[data-a11y-text="-1"] { font-size: 87.5%; }
:root[data-a11y-text="1"]  { font-size: 112.5%; }
:root[data-a11y-text="2"]  { font-size: 125%; }

/* --- dyslexia-friendly font --- */
:root.a11y-dyslexia { --bs-body-font-family: "OpenDyslexic", Helvetica, Arial, sans-serif; }

/* --- spacing --- */
:root.a11y-spacing body :is(p, li, td, th, dt, dd, label, blockquote, small, .lead) {
  line-height: 1.9 !important;
  letter-spacing: .05em !important;
  word-spacing: .12em !important;
}

/* --- highlight links --- */
:root.a11y-links a:not(.nav-link):not(.dropdown-item):not(.nav-logo) {
  text-decoration: underline !important;
  text-decoration-thickness: .12em;
  text-underline-offset: .2em;
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- high contrast --- */
:root.a11y-contrast[data-theme] {
  --nav-glass-bg: #000; --nav-glass-brd: #fff; --nav-menu-bg: #000; --nav-menu-brd: #fff;
  --nav-ink: #fff; --nav-hover-bg: #333; --nav-active-bg: #765EF1; --nav-active-ink: #000;
  --nav-glass-shadow: none;
}
:root.a11y-contrast[data-theme] body {
  background-color: #000 !important;
  background-image: url("https://static.igem.wiki/teams/6459/wiki/home-page/template-high-contrast.avif") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  color: #fff !important;
}

:root.a11y-contrast[data-theme] body :is(h1, h2, h3, h4, h5, h6, p, li, span, small, td, th, label, dt, dd, strong, em, blockquote, .lead) { color: #fff !important; }
:root.a11y-contrast[data-theme] body.home .bg-hero :is(h1, .lead) { color: #fff !important; }
:root.a11y-contrast[data-theme] body :is(.bd-callout, .phase-card, .draft-notes) { background: #000 !important; border-color: #fff !important; }
:root.a11y-contrast[data-theme] body .bg-hero { background: transparent !important; }:root.a11y-contrast[data-theme] body a:not(.nav-link):not(.dropdown-item):not(.nav-logo) { color: #765EF1 !important; text-decoration: underline !important; }
:root.a11y-contrast[data-theme] .footer { background-color: #000 !important; }
:root.a11y-contrast[data-theme] .footer-logo { filter: none; }
:root.a11y-contrast[data-theme] body :is(.nav-logo .logo-light, .nav-theme .icon-light, .back-to-top .btt-light, .nav-ico-light) { display: none; }
:root.a11y-contrast[data-theme] body :is(.nav-logo .logo-dark, .nav-theme .icon-dark, .back-to-top .btt-dark, .nav-ico-dark) { display: block; }

/* --- sepia --- */
:root.a11y-sepia[data-theme] {
  --nav-glass-bg: rgba(244, 236, 216, .78); --nav-glass-brd: rgba(90, 60, 20, .25);
  --nav-menu-bg: rgba(244, 236, 216, .95); --nav-menu-brd: rgba(90, 60, 20, .22);
  --nav-ink: #3B2F1E; --nav-hover-bg: rgba(90, 60, 20, .10);
  --nav-active-bg: #8A5A1E; --nav-active-ink: #fff;
}
:root.a11y-sepia[data-theme] body { background: #F4ECD8 !important; background-image: none !important; color: #3B2F1E !important; }
:root.a11y-sepia[data-theme] body main :is(h1, h2, h3, h4, h5, h6, p, li, span, small, td, th, label, dt, dd, strong, em, blockquote, .lead) { color: #3B2F1E !important; }
:root.a11y-sepia[data-theme] body.home .bg-hero :is(h1, .lead) { color: #3B2F1E !important; }
:root.a11y-sepia[data-theme] body main a:not(.nav-link) { color: #7A4B12 !important; }
:root.a11y-sepia[data-theme] body :is(.nav-logo .logo-dark, .nav-theme .icon-dark, .back-to-top .btt-dark, .nav-ico-dark) { display: none; }
:root.a11y-sepia[data-theme] body :is(.nav-logo .logo-light, .nav-theme .icon-light, .back-to-top .btt-light, .nav-ico-light) { display: block; }

/* ---------- PAGE HERO PHOTOS ---------- */
/* <body> carries one of these; every page under a category uses the same one */
:root { --hero-scrim: rgba(25, 15, 79, .45); }
:root[data-theme="dark"] { --hero-scrim: rgba(10, 5, 35, .55); }

.hero-project .bg-hero,
.hero-wetlab .bg-hero,
.hero-drylab .bg-hero,
.hero-team .bg-hero,
.hero-hp .bg-hero {
  background-image: linear-gradient(var(--hero-scrim), var(--hero-scrim)), var(--hero-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-project { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/home-page/templates/project2.avif"); }
.hero-wetlab  { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/home-page/templates/wet2.avif"); }
.hero-drylab  { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/home-page/templates/model2.avif"); }
.hero-team    { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/home-page/templates/team2.avif"); }
.hero-hp      { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/home-page/templates/human2.avif"); }

:root[data-theme="dark"] .hero-project { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/templates/project-dark.avif"); }
:root[data-theme="dark"] .hero-wetlab  { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/templates/wet-dark.avif"); }
:root[data-theme="dark"] .hero-drylab  { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/templates/model-dark.avif"); }
:root[data-theme="dark"] .hero-team    { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/templates/team-dark.avif"); }
:root[data-theme="dark"] .hero-hp      { --hero-img: url("https://static.igem.wiki/teams/6459/wiki/templates/human-dark.avif"); }

/* ---------- inline citations ---------- */
.cite {
  font-size: .72em;
  font-weight: 700;
  vertical-align: super;
  line-height: 0;
  margin-left: .12em;
  padding: 0 .1em;
  color: var(--color-accent);
  text-decoration: none;
}
.cite:hover,
.cite:focus-visible { color: var(--color-accent-hover); text-decoration: underline; }


/* ===== ICHNOS · Team page ===== */
.ich-team {
  --ich-text: #21172C;
  --ich-accent: #6B3FA0;
  --ich-surface: #FFFFFF;
  --ich-muted: #5A5066;
  --ich-line: #E4DDEC;
  --ich-tag: #EFE8F7;
  --ich-bg: #FBFDFF;
  color: var(--ich-text);
}
/* Dark mode: αctivates if you press data-theme="dark" στο <html> */
[data-theme="dark"] .ich-team {
  --ich-text: #FBFDFF;
  --ich-accent: #C9A7F5;
  --ich-surface: #2D2139;
  --ich-muted: #BDB3C9;
  --ich-line: #45365A;
  --ich-tag: #3A2C4C;
  --ich-bg: #21172C;
}

.ich-hero-photo { width: 100%; border-radius: 16px; display: block; margin: 1rem 0 2.5rem; }

/* to ichnos sta aristera me komvous */
.ich-trace { position: relative; border-left: 2px solid var(--ich-accent); margin-left: .5rem; padding-left: 2rem; }
.ich-section { position: relative; margin-bottom: 3rem; }
.ich-section::before {
  content: ""; position: absolute; left: calc(-2rem - 9px); top: .45rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ich-bg); border: 3px solid var(--ich-accent);
}
.ich-section h2 { margin-bottom: 1rem; }
.ich-group-photo { width: 100%; border-radius: 12px; display: block; margin-bottom: 1.5rem; }

/* card members grids */
.ich-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.ich-solo { grid-template-columns: minmax(0, 320px); }

/* card */
.ich-card {
  display: flex; flex-direction: column;
  background: var(--ich-surface); border: 1px solid var(--ich-line); border-radius: 14px; padding: 1rem;
  transition: transform .2s ease, border-color .2s ease;
}
.ich-card:hover, .ich-card:focus-within { transform: translateY(-4px); border-color: var(--ich-accent); }
.ich-card:focus-visible { outline: 3px solid var(--ich-accent); outline-offset: 3px; }
.ich-tag {
  align-self: flex-start; font-size: .75rem; padding: .15rem .7rem; border-radius: 999px;
  background: var(--ich-tag); color: var(--ich-accent); margin-bottom: .75rem;
}

/* photo + My ICHNOS hover */
.ich-photo { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; margin: 0 0 .75rem; background: var(--ich-tag); }
.ich-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ich-overlay {
  position: absolute; inset: 0; margin: 0; padding: 1rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: rgba(33, 23, 44, .9); color: #FBFDFF; font-size: .9rem; line-height: 1.5;
  opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease;
}
.ich-overlay strong { display: block; color: #C9A7F5; margin-bottom: .25rem; }
.ich-card:hover .ich-overlay, .ich-card:focus-within .ich-overlay { opacity: 1; transform: none; }

.ich-name { font-size: 1.1rem; margin: 0; }
.ich-degree { font-size: .9rem; color: var(--ich-muted); margin: .25rem 0 .5rem; }
.ich-linkedin {
  align-self: flex-end; margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px; color: var(--ich-accent);
}
.ich-linkedin:focus-visible { outline: 3px solid var(--ich-accent); }


@media (max-width: 576px) {
  .ich-trace { padding-left: 1.25rem; }
  .ich-section::before { left: calc(-1.25rem - 9px); }
}
@media (prefers-reduced-motion: reduce) {
  .ich-card, .ich-overlay { transition: none; }
  .ich-card:hover, .ich-card:focus-within { transform: none; }
}
/* ----- title and galerie of team ----- */
.ich-team-name { font-size: clamp(2rem, 5vw, 3rem); text-align: center; margin: 0 0 1rem; color: var(--ich-text); }

.ich-subteams { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.ich-subteam {
  position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  background: var(--ich-tag); border: 2px solid transparent; text-decoration: none;
}
.ich-subteam img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.ich-subteam span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .9rem;
  background: rgba(33, 23, 44, .85); color: #FBFDFF; font-weight: 500;
}
.ich-subteam:hover, .ich-subteam:focus-visible { border-color: var(--ich-accent); }
.ich-subteam:hover img, .ich-subteam:focus-visible img { transform: scale(1.05); }
.ich-subteam:focus-visible { outline: 3px solid var(--ich-accent); outline-offset: 3px; }

.ich-section { scroll-margin-top: 100px; }               
.ich-section:target::before { background: var(--ich-accent); }  
.ich-back { display: inline-block; margin-top: 1rem; font-size: .9rem; color: var(--ich-accent); }

/* Κείμενο ομάδας σε glass πλαίσιο */
.ich-intro {
  max-width: 65ch;
  margin: 0 auto 2.5rem;
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ich-text);

  background: rgba(239, 232, 247, .55);          /* απαλό μωβ, ημιδιάφανο */
  border: 1px solid rgba(107, 63, 160, .18);      /* λεπτό μωβ περίγραμμα */
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(33, 23, 44, .08);   /* απαλή σκιά για βάθος */
  -webkit-backdrop-filter: blur(12px);            /* Safari */
  backdrop-filter: blur(12px);
}

/* Η ερώτηση του ICHNOS: δική της γραμμή, έντονα πλάγια */
.ich-intro-question {
  display: block;
  margin: .55rem 0 .3rem;
  font-weight: 700;
  font-style: italic;
}

/* Και η ατάκα της ομάδας στη γραμμή από κάτω */
.ich-intro-tagline { display: block; }

/* Όσοι έχουν ζητήσει λιγότερη διαφάνεια στο σύστημά τους παίρνουν συμπαγές φόντο */
@media (prefers-reduced-transparency: reduce) {
  .ich-intro { background: #EFE8F7; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Κινητά: λίγο μικρότερο padding */
@media (max-width: 576px) {
  .ich-intro { padding: 1.25rem; font-size: 1.05rem; }
}
.ich-subtitle { margin: -.5rem 0 1.25rem; font-size: 1.05rem; color: var(--ich-muted); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .ich-subteam img { transition: none; } }

/* komvos gemizei otan enotita stin othoni */
.ich-section::before { transition: background-color .3s ease, transform .3s ease; }
.ich-section.is-active::before { background: var(--ich-accent); transform: scale(1.15); }

@media (prefers-reduced-motion: reduce) {
  .ich-section::before { transition: none; }
  .ich-section.is-active::before { transform: none; }
}

.ich-gallery-title { text-align: center; margin: 3rem 0 1.5rem; color: var(--ich-text); }

/* perithorio gia na min peftei to periexomeno sto logo */
.ich-team {
  padding-inline: clamp(1rem, 8vw, 9rem);
}

/* Κινητά: το My ICHNOS ως λεζάντα κάτω από τη φωτογραφία */
@media (hover: none), (max-width: 768px) {
  .ich-card .ich-photo { aspect-ratio: auto; overflow: visible; }
  .ich-card .ich-photo img { aspect-ratio: 1 / 1; height: auto; border-radius: 10px; }
  .ich-card .ich-overlay {
    position: static; opacity: 1; transform: none;
    margin-top: .5rem; border-radius: 8px;
    background: var(--ich-tag); color: var(--ich-text);
  }
  .ich-card .ich-overlay strong { color: var(--ich-accent); }
}

/* ===== Κουμπί λήψης PDF ===== */
.pdf-btn{
  display: inline-block;
  margin-top: 1.5rem;
  padding: .7rem 1.6rem;
  background: #E5574B;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  border-radius: 8px;
  text-decoration: none;
  transition: filter .2s ease, transform .2s ease;
}
.pdf-btn:hover,
.pdf-btn:focus{
  color: #ffffff;
  filter: brightness(.92);
  transform: translateY(-1px);
}
.pdf-btn:focus-visible{
  outline: 3px solid #190F4F;
  outline-offset: 3px;
}


/* ===== Ενσωματωμένο PDF ===== */
.pdf-embed{
  margin: 2rem 0;
  text-align: center;
}
.pdf-embed iframe{
  display: block;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  border: 1px solid rgba(25,15,79,0.15);
  border-radius: 12px;
  background: #ffffff;
}



/* ===== Gallery (coverflow) ===== */
.cf-box{
  position:relative; isolation:isolate; margin:3rem 0;
  padding:1.5rem 1.5rem 2rem;
  border:2px solid rgba(25,15,79,.25); border-radius:24px;
}
[data-theme="dark"] .cf-box{ border-color:rgba(240,222,253,.3); }
.cf-title{ margin:0 0 1.25rem; text-align:center; font-weight:700; }
.cf{ position:relative; padding:0 56px; }
.cf-stage{
  position:relative; width:100%; aspect-ratio:2.1 / 1;
  overflow:hidden; border-radius:16px; touch-action:pan-y;
}
.cf-item{
  position:absolute; top:50%; left:50%; margin:0;
  width:62%; height:auto;
  background:#fff; padding:8px; border-radius:18px; overflow:hidden;
  box-shadow:0 12px 30px rgba(25,15,79,.28);
  transform:translate(calc(-50% + var(--o) * 60%), -50%) scale(calc(1 - var(--a) * .16));
  opacity:calc(1 - var(--a) * .38);
  z-index:calc(10 - var(--a));
  transition:transform .5s cubic-bezier(.3,.8,.3,1), opacity .5s ease;
  cursor:pointer;
}
.cf-item.is-active{ cursor:default; }
.cf-item.is-hidden{ opacity:0; pointer-events:none; }
.cf-item img{ width:100%; height:auto; display:block; border-radius:12px; user-select:none; -webkit-user-drag:none; }
.cf-btn{
  position:absolute; top:50%; transform:translateY(-50%); z-index:20;
  width:44px; height:44px; border:0; border-radius:50%;
  background:#190F4F; color:#fff; font-size:1.6rem; line-height:1;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition:filter .2s ease, transform .2s ease;
}
.cf-btn:hover{ filter:brightness(1.25); transform:translateY(-50%) scale(1.08); }
.cf-btn:focus-visible{ outline:3px solid #E5574B; outline-offset:3px; }
.cf-prev{ left:0; } .cf-next{ right:0; }
[data-theme="dark"] .cf-btn{ background:#f0defd; color:#190F4F; }
@media (max-width:700px){
  .cf-box{ padding:1rem 1rem 1.5rem; }
  .cf{ padding:0 36px; }
  .cf-stage{ aspect-ratio:1.5 / 1; }
  .cf-item{ width:80%; padding:6px; transform:translate(calc(-50% + var(--o) * 42%), -50%) scale(calc(1 - var(--a) * .2)); }
}
@media (prefers-reduced-motion:reduce){ .cf-item{ transition:none; } }

/* ===== Επικεφαλίδα προσώπου (φωτογραφία + όνομα) ===== */
.person-head{
  display:flex; align-items:center; gap:1.5rem;
  margin:0 0 1.25rem;
}
.person-photo{
  flex:0 0 auto; width:120px; height:120px;
  border-radius:50%; object-fit:cover;
  border:3px solid #fff;
  box-shadow:0 8px 22px rgba(25,15,79,.25);
}
.person-name{ margin:0 0 .35rem; font-weight:700; }
.person-role{ margin:0; font-style:italic; opacity:.75; }
@media (max-width:600px){
  .person-head{ flex-direction:column; text-align:center; gap:.9rem; }
  .person-photo{ width:104px; height:104px; }
}

/* =========================================================
   GLOBAL PAGE HERO
   ========================================================= */

.wiki-hero {
  padding: 2rem 0 2.5rem;
}

.wiki-hero .lead {
  max-width: 900px;

  margin: 0.75rem auto 0 !important;

  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.5;

  color: rgba(255, 255, 255, 0.82) !important;
  text-wrap: balance;

  text-shadow: 0 2px 8px rgba(25, 15, 79, 0.35);
}