/* =========================================================================
 * Liquid Glass — an optional, per-visitor skin for the Member Home Page, a
 * sibling to Classic, Platinum, Aqua, Brushed Metal, Yosemite and Big Sur
 * (see theme-classic.css, which this file depends on for the shared
 * switcher CSS and the .win-zoom/.win-minimize base rules).
 *
 * Recreates the translucent, light-bending "glass" material Apple's more
 * recent system redesign builds every surface from -- panels read as actual
 * sheets of glass over whatever's behind them (real vibrancy/refraction
 * needs sampling the page itself, which backdrop-filter blur+saturate
 * stands in for here), with a bright, thin specular highlight along each
 * panel's top edge and fully-rounded, pill-shaped controls throughout.
 * Where Big Sur softened Aqua's gloss into flat frosted toolbars, this goes
 * further still: the glass treatment runs across every surface, not just
 * the title bar, over a saturated, flowing color wash instead of a single
 * photographic-style gradient. Every rule here is original CSS; nothing is
 * traced from or bundles any of Apple's own assets, and every blur/glow
 * below is a CSS effect, not a captured screenshot.
 *
 * Scope: only takes effect under body.theme-liquidglass, so it never
 * touches the default design or any other theme unless a visitor opts in.
 * ========================================================================= */

/* @section Desktop background
   A flowing, multi-hue wash (several overlapping radial gradients rather
   than one blue-to-violet sweep) so there's always something colorful and
   varied for the glass panels above it to actually bend and blur. */
body.theme-liquidglass {
  background-color: #1a1a2e;
  background-image:
    radial-gradient(130% 110% at 85% -10%, rgba(255, 128, 171, 0.55) 0%, transparent 55%),
    radial-gradient(120% 100% at 0% 10%, rgba(97, 201, 255, 0.55) 0%, transparent 50%),
    radial-gradient(110% 120% at 50% 100%, rgba(168, 123, 255, 0.5) 0%, transparent 55%);
  background-attachment: fixed;
}

/* --- Liquid Glass switcher dropdown
   The same frosted-pill instinct every theme's dropdown shares, pushed all
   the way to "barely there": a near-transparent fill, a strong blur+
   saturate, and a bright hairline top edge standing in for a glass
   surface's own specular highlight rather than a plain border. --- */
body.theme-liquidglass .bb-theme-toggle-label {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
/* Tinted dark, not white -- a translucent WHITE pill only reads right over this theme's own
   dark body wash. This same control also sits over a Tech's own cover banner, which can be a
   light color they picked themselves; white-on-translucent-white there was the "still white on
   light" bug. Tinting the glass dark instead gives the pill its own contrast no matter what's
   behind it. */
body.theme-liquidglass .bb-theme-toggle {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(26, 26, 46, 0.55);
  backdrop-filter: blur(24px) saturate(2.1);
  -webkit-backdrop-filter: blur(24px) saturate(2.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  padding: 7px 14px;
}
body.theme-liquidglass .bb-theme-toggle:hover {
  background: rgba(26, 26, 46, 0.7);
}
body.theme-liquidglass .bb-theme-toggle option {
  color: #1d1d1f;
  background: #fff;
}

/* @section Window chrome for the four cards + the Feed box
   Heavily translucent "sheet of glass" panels -- a low-opacity white fill
   plus a strong blur+saturate so the colorful wash behind genuinely shows
   and shifts through them, large squircle corners, and a bright inset top
   highlight line standing in for the way real glass catches light along
   its upper edge, on top of a soft, diffused shadow lifting it off the
   background. */
body.theme-liquidglass .profile-card,
body.theme-liquidglass .certifications-card,
body.theme-liquidglass .conferences-card,
body.theme-liquidglass .activity-card,
body.theme-liquidglass .elsewhere-card,
body.theme-liquidglass #member-feed {
  position: relative;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(30px) saturate(1.9);
  -webkit-backdrop-filter: blur(30px) saturate(1.9);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 20px 48px rgba(10, 10, 30, 0.35);
  overflow: hidden;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #fff;
}

/* The title bar: blended straight into the glass rather than a separately
   tinted strip (Liquid Glass's whole point is one continuous sheet, not
   chrome bolted onto a card) -- just a faint divider line beneath it, with
   softly glowing glass "orbs" standing in for real traffic lights. */
body.theme-liquidglass .win-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
}
body.theme-liquidglass .win-close,
body.theme-liquidglass .win-minimize,
body.theme-liquidglass .win-zoom {
  display: block;
  flex: none;
  order: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3);
}
body.theme-liquidglass .win-close {
  background: rgba(255, 95, 87, 0.85);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3), 0 0 6px rgba(255, 95, 87, 0.7);
  order: 1;
  margin-left: 4px;
}
body.theme-liquidglass .win-minimize {
  background: rgba(254, 188, 46, 0.85);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3), 0 0 6px rgba(254, 188, 46, 0.7);
  order: 2;
  margin-left: 8px;
}
body.theme-liquidglass .win-zoom {
  background: rgba(40, 200, 64, 0.85);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3), 0 0 6px rgba(40, 200, 64, 0.7);
  order: 3;
  margin-left: 8px;
}
body.theme-liquidglass .win-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  pointer-events: none;
  order: 4;
}

/* Push each card's own content below the title bar. */
body.theme-liquidglass .profile-card,
body.theme-liquidglass .certifications-card,
body.theme-liquidglass .conferences-card,
body.theme-liquidglass .activity-card,
body.theme-liquidglass .elsewhere-card {
  padding: 0 0 var(--ds-space-md);
}
body.theme-liquidglass .profile-card > *:not(.win-titlebar),
body.theme-liquidglass .certifications-card > *:not(.win-titlebar),
body.theme-liquidglass .conferences-card > *:not(.win-titlebar),
body.theme-liquidglass .activity-card > *:not(.win-titlebar),
body.theme-liquidglass .elsewhere-card > *:not(.win-titlebar) {
  margin-left: var(--ds-space-md);
  margin-right: var(--ds-space-md);
}
body.theme-liquidglass .profile-card-head,
body.theme-liquidglass .activity-stats,
body.theme-liquidglass .certifications-card-head {
  margin-top: var(--ds-space-md);
}

/* The in-card headings are redundant once the title bar already says the
   same thing (same reasoning as the other six themes). */
body.theme-liquidglass .certifications-heading,
body.theme-liquidglass .activity-heading,
body.theme-liquidglass .member-feed-row-heading,
body.theme-liquidglass .member-feed-heading {
  display: none;
}

body.theme-liquidglass #member-feed > *:not(.win-titlebar) {
  padding-left: var(--ds-space-md);
  padding-right: var(--ds-space-md);
}
body.theme-liquidglass #member-feed .feed-filters {
  margin-top: var(--ds-space-md);
}
body.theme-liquidglass #member-feed .feed-list {
  padding-bottom: var(--ds-space-md);
}

/* Body text on a glass panel needs to stay legible over a background that
   can be light or dark depending on what's blurring through it -- lightened
   across the board rather than left at the default design's near-black ink. */
body.theme-liquidglass .profile-name,
body.theme-liquidglass .profile-tagline,
body.theme-liquidglass .feed-item-body,
body.theme-liquidglass .feed-item-title a,
body.theme-liquidglass p {
  color: #fff;
}

/* @section Rounded, filled glass controls
   Every pill/button/tag gets the same treatment as the switcher dropdown
   above: translucent fill, blur+saturate, and a bright top highlight,
   rather than a flat opaque color. */
body.theme-liquidglass .atechs-btn,
body.theme-liquidglass .feed-tag,
body.theme-liquidglass .feed-filter,
body.theme-liquidglass .cert-since-badge,
body.theme-liquidglass .feed-item-longform-badge,
body.theme-liquidglass .activity-stat,
body.theme-liquidglass .profile-status-item,
body.theme-liquidglass .atechs-tag {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
body.theme-liquidglass .feed-filter.is-active {
  background: rgba(97, 201, 255, 0.55);
  border-color: rgba(97, 201, 255, 0.7);
}
body.theme-liquidglass .elsewhere-link,
body.theme-liquidglass .elsewhere-label,
body.theme-liquidglass .elsewhere-value,
body.theme-liquidglass .feed-item-title a,
body.theme-liquidglass .cert-since-value,
body.theme-liquidglass .activity-value {
  color: #9be1ff !important;
}

/* @section Feed items
   Each item is its own small glass pane: translucent, blurred, a bright
   top edge, and a soft wide shadow, rather than a flat opaque card. */
body.theme-liquidglass .feed-item {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px rgba(10, 10, 30, 0.25);
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
body.theme-liquidglass .feed-item + .feed-item {
  margin-top: var(--ds-space-sm);
}

/* Glass stays colorful rather than monochrome (the opposite instinct from
   Classic's 1-bit pass) -- a light saturation lift so photos read as being
   seen through tinted glass rather than looking washed out against it. */
body.theme-liquidglass img,
body.theme-liquidglass .profile-cover {
  filter: saturate(1.1);
}
