/* Light / dark theme.
   Dark is the original Webflow design. Light mode remaps the Webflow colour variables
   and overrides the handful of hard-coded colours. The theme is set on <html data-theme>. */

html[data-theme="light"] {
  color-scheme: light;

  /* Webflow variables */
  --text-color--text-0: #0a0d14;
  --text-color--text-300: #525866;
  --text-color--text-400: #6b7280;
  --text-color--text-500: #868c98;
  --base-color-neutral--neutral-lighter: #3a3f4a;
  --base-color-neutral--neutral-light: #6b7280;
  --base-color-neutral--neutral: #6b7280;
  --base-color-neutral--neutral-dark: #a3a8b3;

  /* Case study variables */
  --cs-bg: #fff;
  --cs-text: #0a0d14;
  --cs-text-soft: #3a3f4a;
  --cs-text-muted: #6b7280;
  --cs-text-faint: #a3a8b3;
  --cs-line: rgba(10, 13, 20, 0.1);
  --cs-tile: #f3f3f4;
}
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] body {
  background-color: #fff;
  color: #0a0d14;
}

/* Surfaces */
html[data-theme="light"] .section_hero,
html[data-theme="light"] .case_hero_section,
html[data-theme="light"] .footer {
  background-color: #fff;
  color: #0a0d14;
}
html[data-theme="light"] .work_card {
  color: #0a0d14;
}
html[data-theme="light"] .marquee-wrapper {
  background-color: transparent;
  color: #222;
}
html[data-theme="light"] .image-2 {
  background-color: #fff;
}

/* Nav */
html[data-theme="light"] .nav_component {
  background-color: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(10, 13, 20, 0.08);
}
html[data-theme="light"] .nav_menu_link,
html[data-theme="light"] .nav_menu_link.w--current,
html[data-theme="light"] .nav_button {
  color: #0a0d14;
}
html[data-theme="light"] .nav_menu_link:hover {
  border-color: rgba(10, 13, 20, 0.08);
}
@media screen and (max-width: 991px) {
  html[data-theme="light"] .nav_menu {
    background-color: #fff;
  }
  html[data-theme="light"] .nav_button.w--open {
    background-color: rgba(10, 13, 20, 0.06);
  }
}

/* Lines, chips, buttons */
html[data-theme="light"] .line {
  background-color: rgba(10, 13, 20, 0.12);
  background-image: none;
}
html[data-theme="light"] .resume_list {
  border-bottom-color: rgba(10, 13, 20, 0.1);
}
html[data-theme="light"] .primary_button.bg,
html[data-theme="light"] .coming-soon {
  background-color: rgba(10, 13, 20, 0.06);
}
html[data-theme="light"] .primary_button:hover {
  border-color: rgba(10, 13, 20, 0.12);
}
html[data-theme="light"] .hero-roles {
  background-image: linear-gradient(180deg, #fff, var(--text-color--text-400) 34%, #a3a8b3 71%, #fff);
}

/* White SVG arrow icons */
html[data-theme="light"] img[src*="arrow-right-up-line"],
html[data-theme="light"] img[src*="arrow-down-line"] {
  filter: invert(1);
}

/* Case study bits */
html[data-theme="light"] .cs-button {
  background: rgba(10, 13, 20, 0.06);
  box-shadow: inset 0 0 0 1px rgba(10, 13, 20, 0.08);
}
html[data-theme="light"] .cs-button:hover {
  background: rgba(10, 13, 20, 0.1);
}

/* ---------- Toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin-left: auto;
  margin-right: 8px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
.theme-toggle:active {
  transform: scale(0.94);
}
.theme-toggle:focus-visible {
  outline: 2px solid #4d65ff;
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-sun {
  display: none;
}
html[data-theme="light"] .theme-toggle {
  border-color: rgba(10, 13, 20, 0.12);
  color: #0a0d14;
}
html[data-theme="light"] .theme-toggle:hover {
  background: rgba(10, 13, 20, 0.05);
}
/* Show the icon for the theme you'd switch to */
html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Smooth swap when toggling (not on first paint) */
html.theme-transition,
html.theme-transition * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Home "Resume" section: in dark mode a Webflow scroll interaction fades it from black to white
   (inline styles). The page is already white in light mode, so keep it still. */
html[data-theme="light"] [data-w-id="fb17a3fc-7717-0a09-85a4-6037762144b4"] {
  background-color: transparent !important;
}

/* Tiles need a slightly firmer edge on a white page */
html[data-theme="light"] .cs-tile::after {
  box-shadow: inset 0 0 0 1px rgba(10, 13, 20, 0.08);
}

/* Demo button: black in both themes (outlined on the dark page, see case-study.css) */
html[data-theme="light"] .cs-button.cs-button--primary {
  background: #0a0d14;
  box-shadow: none;
  color: #fff;
}
html[data-theme="light"] .cs-button.cs-button--primary:hover {
  background: #2b303b;
}
