/* Materialize portfolio: visually scoped to dark mode; existing light theme untouched. */
@media screen {
:root[data-site-theme="dark"] {
  --site-bg: #0d0e10;
  --site-surface: #191b1e;
  --site-surface-raised: #24262a;
  --site-border: #383a40;
  --site-text: #e9e9eb;
  --site-muted: #a8aab1;
  --site-link: #9abfe0;
  --site-navigation-bg: #141518;
  background: var(--site-bg);
}
:root[data-site-theme="dark"] body.grey.lighten-2 { background-color: var(--site-bg) !important; color: var(--site-text); }
:root[data-site-theme="dark"] body .card:not(.bg-color),
:root[data-site-theme="dark"] body .card-panel,
:root[data-site-theme="dark"] body .card.white { background-color: var(--site-surface) !important; color: var(--site-text); }
:root[data-site-theme="dark"] .card .card-content, :root[data-site-theme="dark"] .legal-card { color: var(--site-text); }
:root[data-site-theme="dark"] .card .grey-text, :root[data-site-theme="dark"] .card-panel .grey-text { color: var(--site-muted) !important; }
:root[data-site-theme="dark"] .card:not(.bg-color) h2[style*="color: #31668E"] { color: #9abfe0 !important; }
:root[data-site-theme="dark"] header nav .brand-logo svg g { fill: #9abfe0; stroke: #9abfe0; }
:root[data-site-theme="dark"] .legal-title,
:root[data-site-theme="dark"] .error-card h1 { color: var(--site-text) !important; }
:root[data-site-theme="dark"] main a:not(.btn):not(.btn-floating),
:root[data-site-theme="dark"] .breadcrumb-item a.link-primary { color: var(--site-link) !important; }
:root[data-site-theme="dark"] ol.breadcrumb.text-body, :root[data-site-theme="dark"] .breadcrumb-item.active { color: var(--site-muted) !important; }
:root[data-site-theme="dark"] .contact-divider { background: var(--site-border); }
:root[data-site-theme="dark"] .contact-form input:not([type="hidden"]),
:root[data-site-theme="dark"] .contact-form textarea { color: var(--site-text); border-bottom-color: var(--site-border); caret-color: var(--site-link); }
:root[data-site-theme="dark"] .contact-form input::placeholder,
:root[data-site-theme="dark"] .contact-form textarea::placeholder { color: var(--site-muted); }
:root[data-site-theme="dark"] .contact-form label { color: var(--site-muted); }
:root[data-site-theme="dark"] .contact-form input:focus + label,
:root[data-site-theme="dark"] .contact-form textarea:focus + label { color: var(--site-link) !important; }
:root[data-site-theme="dark"] .contact-form input:focus,
:root[data-site-theme="dark"] .contact-form textarea:focus { border-color: var(--site-link) !important; box-shadow: 0 1px 0 var(--site-link) !important; }
:root[data-site-theme="dark"] .card.bg-color { background-color: #202225 !important; color: #f4f4f6; }
:root[data-site-theme="dark"] #vcard .slant { border-left-color: #202225 !important; }
:root[data-site-theme="dark"] .card.bg-color a, :root[data-site-theme="dark"] .card.bg-color h1 { color: #fff !important; }
:root[data-site-theme="dark"] .skillbar .progress.grey { background-color: #34373d !important; }
:root[data-site-theme="dark"] .skillbar .progress .determinate.white { background-color: #e9ebed !important; }
/* Desktop Materialize menu, including inline white nav background removed in template. */
:root[data-site-theme="dark"] header > nav.white { background: #141518 !important; }
:root[data-site-theme="dark"] header nav ul a:not(.btn),
:root[data-site-theme="dark"] header nav .color,
:root[data-site-theme="dark"] header nav .sidenav-trigger,
:root[data-site-theme="dark"] nav .site-lang,
:root[data-site-theme="dark"] header nav .site-lang[aria-current="page"] > span { color: var(--site-link) !important; }
:root[data-site-theme="dark"] header nav ul li:hover,
:root[data-site-theme="dark"] header nav ul li.active { background-color: rgb(255 255 255 / .055); }
:root[data-site-theme="dark"] #homepage-tools-dropdown,
:root[data-site-theme="dark"] #homepage-pdf-dropdown { background: var(--site-surface); box-shadow: 0 7px 24px rgb(0 0 0 / .4); }
:root[data-site-theme="dark"] #homepage-tools-dropdown li a,
:root[data-site-theme="dark"] #homepage-pdf-dropdown li a { color: var(--site-link) !important; }
:root[data-site-theme="dark"] #homepage-tools-dropdown li:hover,
:root[data-site-theme="dark"] #homepage-pdf-dropdown li:hover { background: var(--site-surface-raised); }
:root[data-site-theme="dark"] .home-mobile-menu { background: var(--site-surface); color: var(--site-text); }
/* Materialize assigns a separate background/line-height to li and li > a. The
   accordion rows must match the normal mobile navigation links in every state. */
:root[data-site-theme="dark"] .home-mobile-menu > li.home-mobile-link,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group details,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group summary,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-link > a {
  background-color: transparent;
}
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group summary {
  font-weight: 400;
  line-height: 1.4;
  font-size: 1rem;
}
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group .home-mobile-sub-link {
  background: #202226;
}
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-link > a,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group summary,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-sub-link {
  color: var(--site-link) !important;
}
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-link > a,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group summary,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-sub-link,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-languages a { color: var(--site-link); }
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-link > a:hover,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group summary:hover,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-sub-link:hover { background: #292b30; }
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-languages,
:root[data-site-theme="dark"] .home-mobile-theme { border-color: var(--site-border); }
:root[data-site-theme="dark"] .material-tooltip { background: #35373c; color: var(--site-text); }
:root[data-site-theme="dark"] .site-footer.page-footer { background: #111214; }
/* Fallback uses the same random photo as the Materialize image. No filter on the
   moving <img>: filters can interfere with compositing in the parallax plugin. */
:root[data-site-theme="dark"] .parallax-container {
  background-color: #0d0e10;
  background-image: var(--site-parallax-image);
  background-size: cover;
  background-position: center center;
  isolation: isolate;
}
:root[data-site-theme="dark"] .parallax-container .parallax img {
  filter: none;
  opacity: 1;
  visibility: visible;
}
:root[data-site-theme="dark"] .parallax-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgb(0 0 0 / .18);
  pointer-events: none;
}
:root[data-site-theme="dark"] .site-theme-menu button { line-height: 1.35; }
}
/* Match the desktop appearance control to the neighboring DE/EN links;
   Materialize's nav anchor styles do not apply to buttons. */
.home-theme-nav-item .site-theme-trigger { color: #31668e; }
:root[data-site-theme="dark"] header nav .home-theme-nav-item .site-theme-trigger {
  color: var(--site-link) !important;
}
/* Materialize desktop only: visually center the chevrons alongside text and
   the half-circle. The rotated strokes are optically lower than their box.
   Scope both directions so mobile and Bootstrap positioning are untouched. */
@media (min-width: 993px) {
  .home-nav-wrapper > ul.right > li > a.dropdown-trigger > .site-nav-chevron {
    transform: translateY(-5px) rotate(45deg);
  }
  .home-nav-wrapper > ul.right > li > a.dropdown-trigger[aria-expanded="true"] > .site-nav-chevron {
    transform: translateY(2px) rotate(225deg);
  }
  .home-theme-nav-item .site-theme-trigger > .site-theme-chevron {
    transform: translateY(-3px) rotate(45deg);
  }
  .home-theme-nav-item .site-theme-trigger[aria-expanded="true"] > .site-theme-chevron {
    transform: translateY(3px) rotate(225deg);
  }
}
/* Theme control is a navigation item, without Materialize's 64px anchor styling. */
.home-theme-nav-item { display: flex; align-items: center; height: 64px; }
.home-theme-nav-item .site-theme-switch { height: auto; }
.home-theme-nav-item:hover { background: transparent !important; }
.home-mobile-theme { margin-top: .4rem; border-top: 1px solid #e5e5e5; }
.home-mobile-theme .site-theme-trigger { color: #31668e; }
.home-mobile-theme .site-theme-menu { background: transparent; }
@media (min-width: 993px) and (max-width: 1200px) {
  header nav .home-nav-wrapper > ul.right > li > a { padding-left: 9px; padding-right: 9px; }
}

/* Appearance is a secondary preference alongside language, not a primary
   nav item. Keep its half-circle on the LEFT, with the same weight and size as
   Deutsch/English. No divider between the related preferences. */
.home-mobile-menu .home-mobile-theme { line-height: normal; }
.home-mobile-menu .home-mobile-theme .site-theme-trigger {
  border: 0;
  border-radius: 0;
  color: #31668e;
  font: 600 .85rem/1.4 'Raleway', Arial, sans-serif;
}
.home-mobile-menu .home-mobile-languages { margin-top: 0; border-top: 0; }
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-theme .site-theme-trigger { color: var(--site-link) !important; }
/* style.php globally forces links to the light accent with !important. */
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-languages > a { color: var(--site-link) !important; }
/* The active language's <span> has its own dark text color in style.php.
   Keep the underline as the selection marker, but match both language labels
   to the same readable accent in dark mode. */
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-languages > a[aria-current="page"] > span {
  color: var(--site-link) !important;
}
/* Materialize's global focused-button styling must not recolor a menu row
   after touch selection or after closing the mobile drawer. */
.home-mobile-menu .home-mobile-head button.home-mobile-close:focus { background: transparent; }
.home-mobile-menu .home-mobile-theme button.site-theme-trigger:focus:not([aria-expanded="true"]) { background: transparent; }
/* Mouse/touch selection should not leave a hovered accordion row behind.
   Keyboard users still get the browser's focus-visible indication. */
.home-mobile-menu .home-mobile-group summary:focus:not(:focus-visible),
.home-mobile-menu .home-mobile-link > a:focus:not(:focus-visible),
.home-mobile-menu .home-mobile-sub-link:focus:not(:focus-visible) { background-color: transparent; }
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group summary:focus:not(:focus-visible),
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-link > a:focus:not(:focus-visible) { background-color: transparent; }
/* Keyboard focus may be visible, but should never produce a light/teal flash. */
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-group summary:focus-visible,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-link > a:focus-visible,
:root[data-site-theme="dark"] .home-mobile-menu .home-mobile-sub-link:focus-visible { background-color: #292b30; }

