/* Desktop Home, dark mode only: white bottom wave on Sketchbook hover. */
:root[data-theme="dark"] body:has(.home):has(.seg a[href="#sketchbook"]:hover) .bblur,
:root[data-theme="dark"] body:has(.home):has(.seg a[href="#sketchbook"]:focus-visible) .bblur {
  --haze: #fff;
}

/* White nav labels on hover and keyboard focus, desktop Home dark mode only. */
:root[data-theme="dark"] body:has(.home) .nav .seg a:hover,
:root[data-theme="dark"] body:has(.home) .nav .seg a:focus-visible {
  color: #fff;
}

/* Keep the selected word light after hover ends; soften the divider beside Work. */
:root[data-theme="dark"] body:has(.home) .nav .seg a {
  color: #fff;
}
:root[data-theme="dark"] body:has(.home) .nav:not(.collapsed) .seg .nav-tools::before {
  background: rgba(255, 255, 255, 0.18);
  left: calc(var(--b) * -0.55 * var(--bs));
}

/* White hover wave for the six projects named by Deja, dark desktop Home only. */
:root[data-theme="dark"] body:has(.home):has(
  .row[data-slug="w-hotel"]:hover,
  .row[data-slug="barcelona-city-hall"]:hover,
  .row[data-slug="australis"]:hover,
  .row[data-slug="3d-ai-education"]:hover,
  .row[data-slug="pull-bear"]:hover,
  .row[data-slug="textile-prints"]:hover
) .bblur {
  --haze: #fff;
}

/* Match Sketchbook: these covers must not add the separate black cover fade under the white wave. */
:root[data-theme="dark"] body:has(.home):has(
  .row[data-slug="w-hotel"]:hover,
  .row[data-slug="barcelona-city-hall"]:hover,
  .row[data-slug="australis"]:hover,
  .row[data-slug="3d-ai-education"]:hover,
  .row[data-slug="pull-bear"]:hover,
  .row[data-slug="textile-prints"]:hover
) .covers::before {
  opacity: 0;
}

/* Education and Field Notes: match their light-mode Home hover visuals in dark mode. */
:root[data-theme="dark"] .hv-fn.on { display: block; }
:root[data-theme="dark"] body:has(.hv-fn.on) .cv[data-for="3d-ai-field-notes"],
:root[data-theme="dark"] body:has(.hv-fn.on) .ground { opacity: 0 !important; }
:root[data-theme="dark"] body:has(.home):has(
  .row[data-slug="3d-ai-education"]:hover,
  .row[data-slug="3d-ai-field-notes"]:hover
) .covers { --bg: #fff; }
:root[data-theme="dark"] body:has(.home):has(
  .row[data-slug="3d-ai-education"]:hover,
  .row[data-slug="3d-ai-field-notes"]:hover
) .covers::before { opacity: 1; }
:root[data-theme="dark"] body:has(.hv-fn.on) .bblur { --haze: #fff; }

/* Full-window hover covers: the rounded corners are baked into the dark JPGs.
   A 4% overscan moves them outside the viewport without editing the original artwork.
   Creativia keeps its proportional card; Cupra already has a larger hover scale.
   Education and Field Notes use their separate animated openings. */
:root[data-theme="dark"] .covers > .cv-d:not([data-for="creativia"]):not([data-for="cupra-x-rosalia"]):not([data-for="3d-ai-education"]):not([data-for="3d-ai-field-notes"]) {
  scale: 1.04;
}
