:root {
  --purple: rgba(165, 233, 106, 0.55);
  --violet2: #8C78B3;
  --violet: #C5B5F7;
  --fresh-lime: rgba(165, 233, 106, 0.55);
  --indigo: rgba(81, 100, 243, 0.55);
  --gold: rgba(247,212,119, 0.55);
  --fushia: rgba(255,95,207,0.55);
  --outlines: #141414;
  --mist-grey: #B6B6B6;
}

/* ========== DESKTOP DESIGN SCALE ==========
   Reduces base font-size to 80% on desktop.
   All rem/em-based sizes become 20% smaller.
   
   Why this works:
   - Browser default: 1rem = 16px
   - With 80%: 1rem = 12.8px
   - No zoom/transform = no scroll/pointer/viewport bugs
   - Layout logic unchanged, just proportionally smaller
   ========================================= */
@media (min-width: 900px) {
  html {
    font-size: 80%;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  /* desktop/tablet: custom scroll only */
  font-family: system-ui, sans-serif;
  
  /* --- ADD THIS --- */
    background-image: url("Icons/pattern.svg");
    background-repeat: no-repeat;
    /* optional */
    background-size: cover;
    /* cover, contain, or a size */
    background-position: center right;
    /* adjust as needed */
}

/* Whole page layout: 3 columns side-by-side */
.layout {
  display: flex;
  height: 100vh;
}

/* Generic logo styling */
.site-logo {
  display: block;
  max-width: 48px;           /* was 60px, reduced 20% */
  /* adjust size as you like */
  height: auto;
}

/* Desktop logo: sits above nav, right-aligned */
.site-logo--desktop {
  margin-bottom: 160px;      /* was 200px, reduced 20% */
  /* space between logo and index */
}

/* Hover grow effect for the desktop logo */
.site-logo {
  transition: transform 0.25s ease;
  transform-origin: center;
  cursor: pointer;
}

.site-logo:hover {
  transform: scale(1.15);
}

/* Mobile header (logo + hamburger): hidden by default, shown on small screens */
.logo-mobile-wrapper {
  display: none;
}

/* LEFT RAIL (desktop index column) */
.left-rail {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  /* logo above nav */
  justify-content: flex-start;
  /* stack from top */
  align-items: flex-end;
  /* logo + nav right-aligned toward scrollbar */
  padding-top: 16px;           /* was 20px, reduced 20% */
  padding-right: 13px;         /* was 16px, reduced 20% */
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0);
  }

/* Side nav index */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;                              /* was 0.6rem, reduced 20% */
  text-align: right;
  padding-left: clamp(2px, 5.6vw, 144px);    /* was clamp(3px, 7vw, 180px), reduced 20% */
  margin-top: 60px;                          /* was 75px, reduced 20% */
}

.side-nav a {
  text-decoration: none;
  font-weight: bold;
  color: #222;
  font-size: 19px;             /* was 24px, reduced 20% */
  display: inline-block;
  transform-origin: right center;
  transition: transform 0.15s ease, color 0.15s ease;
}

/* Hover + Active */
.side-nav a:hover,
.side-nav a.active {
  transform: scale(1.2);
  color: var(--violet);
}

/* ========== CUSTOM SCROLLBAR TRACK (MIDDLE COLUMN) ========== */
.scrollbar-track {
  flex: 0 0 20px;
  /* fixed 12px column */
  /* border: 2px solid var(--outlines); */
  border:solid 1px #141414;
  position: relative;
  background: white;
  /* so thumb can be absolute inside */
}

/* Black rectangle that moves */
.scrollbar-thumb {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 70px;
  /* JS will update */
  background: var(--violet);
  border-top: solid 1px black;
  border-bottom: solid 1px black;
}

/* ========== CONTENT COLUMN (RIGHT) ========== */
.scroll-container {
  flex: 1 1 auto;
  /* takes the rest, shrinks/grows smoothly */
  overflow-y: scroll;
  overflow-x: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.85);
}

/* LINE between sections*/


.title-section {
  display: flex;
  justify-self: flex-start;
  color: #000000;
  padding: 0px 20px;
  margin-top: 0px;
  border-radius: 10px;
  /* border:solid 2px var(--violet); */
  /* background: var(--violet); */
  /* border: solid 1px #141414; */
  justify-content: center;
  margin-bottom: 15px;
  margin-top: 250px;
}

.title-section * {
  margin-top: 0;
}

.section-title {
  font-size: 2.3em;
  font-weight: bold;
}


.scroll-inner {
  padding: 3rem 4rem;
  box-sizing: border-box;
}

.page-section {
  min-height: auto;
  padding-bottom: 0px;
  margin-top: 20px; 
  /* border-bottom: 1px solid #141414; */
  /* margin added for line btween sections */
}

.space-title {
  height: 10px;
}

/* ========== MOBILE MENU ========== */

/* hidden by default */
.mobile-menu {
  display: none;
}

/* shown only when toggled by JS */
.mobile-menu--open {
  display: block;
}

/* Mobile menu layout on small screens */
@media (max-width: 800px) {
  .mobile-menu {
    position: fixed;
    top: 60px;
    /* just under sticky mobile header */
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    z-index: 90;
  }

  .mobile-menu a {
    display: block;
    padding: 0.35rem 0;
    text-decoration: none;
    color: #222;
    font-weight: bold;
    font-size: 14px;
  }
}

/* ========== RESPONSIVE BEHAVIOUR ========== */

/* ≤ 700px: hide left rail, show sticky mobile header */
@media (max-width: 700px) {
  .left-rail {
    display: none;
  }

  .logo-mobile-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 4rem 0 4rem;
    box-sizing: border-box;

    position: sticky;
    top: 0;
    z-index: 100;
    /* above content */
    background: rgba(255, 255, 255, 0.95);
  }

  .hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #222;
    border-radius: 999px;
  }

  .scroll-inner {
    padding-top: 2rem;
    /* extra space under sticky header */
  }
}

/* ≤ 500px: hide custom scrollbar track, keep scroll-container scrolling */
@media (max-width: 650px) {
  .scrollbar-track {
    display: none;
  }

  .scroll-inner {
    padding: 1.5rem 1.25rem;
    padding-top: 2.5rem;
    /* a bit more space for the sticky header */
  }

  .logo-mobile-wrapper {
    padding: 1rem 1.25rem 0 1.25rem;
  }

  .section-title {
    font-size: 1.2em;
  }
}





/* LADYBUG */
/* LADYBUG */
/* LADYBUG */

/* Bug sprite */
.ladybug {
  position: absolute;
  width: 150px;
  height: auto;
  pointer-events: auto;
  z-index: 50;
  image-rendering: pixelated;
  cursor: pointer;
  /* JS will set transform = rotate(...) only */
  transition: transform 0.15s linear;
}

#ladybug {
  display: none;
}

.ladybug {
  touch-action: none;
  /* prevent browser from hijacking touch as scroll/zoom */
}



/* =======================================
   FOOTER
   ======================================= */
.site-footer {
  padding: 18px 20px 24px;
  text-align: center;
  font-size: 1rem;
  color: #141414;
}