/* ==========================================================================
   ESEM26 · Workshop Speakers page (v1.1.0)
   Same cards and profile window as the homepage "Plenary Speakers" section
   (e26-mc / e26-mdl), laid out as one grid of all workshop speakers.
   Everything is scoped under .ews so the site's Bootstrap / style-1.css can't
   change it, and it can't change the rest of the page.
   ========================================================================== */

/* ---------- Tokens (homepage values) ---------- */
.ews {
  --navy: #0e2a4f;
  --navy-deep: #0a2142;
  --ink: #2b4560;
  --muted: #566b82;
  --teal-ink: #0f6f6c;
  --teal: #1fa39c;
  --aqua: #8fdcd6;
  --blue: #2a6bab;
  --ice: #f4fafb;
  --ice-2: #ecf7f8;
  --line: rgba(14, 42, 79, .09);
  --line-2: rgba(14, 42, 79, .14);
  --line-teal: rgba(31, 163, 156, .3);
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --wrap: 1200px;
  --gutter: 24px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: left;
}

/* ---------- Scoped reset (0,1,0 so it beats the site's element rules; component classes come later and win) ---------- */
.ews :where(*, *::before, *::after) { box-sizing: border-box; }
.ews :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; padding: 0; }
.ews :where(ul, ol) { list-style: none; }
.ews :where(img) { max-width: 100%; height: auto; display: block; border: 0; }
.ews :where(button) { font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal; }
.ews :where(:focus-visible) { outline: 2px solid var(--teal); outline-offset: 3px; }
.ews ::selection { background: rgba(143, 220, 214, .45); color: var(--navy-deep); }

.ews-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ews .e26-i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Section (homepage .e26-section.e26-committees) ---------- */
.ews-section {
  position: relative; isolation: isolate;
  padding: clamp(64px, 8vw, 110px) 0 clamp(76px, 9vw, 124px);
  background: linear-gradient(180deg, #ffffff 0%, var(--ice) 40%, #f7fbfc 100%);
}
@supports (overflow: clip) { .ews-section { overflow-x: clip; } }
.ews-wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.ews .e26-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(24, 110, 130, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 110, 130, .06) 1px, transparent 1px),
    linear-gradient(to right, rgba(24, 110, 130, .03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 110, 130, .03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 55% 30% at 50% 8%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 55% 30% at 50% 8%, #000 0%, transparent 75%);
}
.ews .e26-dots-bg {
  position: absolute; z-index: -1; pointer-events: none; width: 260px; height: 200px;
  background-image: radial-gradient(rgba(31, 163, 156, .28) 1.1px, transparent 1.3px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
          mask-image: radial-gradient(closest-side, #000, transparent);
}

/* ---------- Page heading (homepage .e26-head--center) ---------- */
.ews .e26-head { display: grid; gap: 14px; justify-items: center; text-align: center; margin-bottom: clamp(40px, 5vw, 64px); }
.ews .e26-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--teal); }
.ews .e26-eyebrow i { display: block; width: 44px; height: 1px; background: linear-gradient(90deg, rgba(31, 163, 156, .6), transparent); }
.ews .e26-eyebrow::before { content: ""; display: block; width: 44px; height: 1px; background: linear-gradient(90deg, transparent, rgba(31, 163, 156, .6)); }
.ews .e26-eyebrow svg { width: 40px; height: 16px; }
.ews .e26-eyebrow path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ews .e26-h1 {
  font-family: var(--font); font-size: clamp(30px, 3.6vw, 48px); font-weight: 600;
  line-height: 1.15; letter-spacing: -.022em; color: var(--navy);
}

/* ---------- Grid ---------- */
/* every card is the same width (as on the homepage, 4 / 3 / 2 per row); short rows are centred */
.ews-grid { --per: 4; --gap: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
@media (max-width: 1199px) { .ews-grid { --per: 3; } }
@media (max-width: 899px) { .ews-grid { --per: 2; --gap: 16px; } }
@media (max-width: 599px) { .ews { --gutter: 18px; } .ews-grid { --gap: 12px; } }
.ews .e26-mc { display: flex; min-width: 0; flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); }

/* ---------- Speaker card (homepage .e26-mc-card: photo, name, country) ---------- */
.ews .e26-mc-card {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 10px;
  border-radius: 18px; border: 1px solid var(--line); background: #fff;
  box-shadow: 0 1px 2px rgba(14, 42, 79, .04), 0 14px 30px -24px rgba(14, 42, 79, .4);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.ews .e26-mc-card::after { /* accent line */
  content: ""; position: absolute; left: 24px; right: 24px; bottom: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--blue)); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .6s var(--ease);
}
.ews .e26-mc-card:hover, .ews .e26-mc-card:focus-within { border-color: var(--line-teal); box-shadow: 0 2px 4px rgba(14, 42, 79, .05), 0 26px 44px -28px rgba(14, 42, 79, .5); }
.ews .e26-mc-card:hover::after, .ews .e26-mc-card:focus-within::after { transform: scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
  .ews .e26-mc-card:hover, .ews .e26-mc-card:focus-within { transform: translateY(-4px); }
}
.ews .e26-mc-photo, .ews-mdl .e26-mdl-photo {
  position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, #e3f3f3 0%, #e6edf6 100%);
}
.ews .e26-mc-photo img, .ews-mdl .e26-mdl-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform 1.1s var(--ease), opacity .5s ease; }
.ews .e26-mc-card:hover .e26-mc-photo img { transform: scale(1.04); }
.ews .e26-mc-photo.is-fallback img, .ews-mdl .e26-mdl-photo.is-fallback img { display: none; }
.ews .e26-mc-photo.is-fallback::before, .ews-mdl .e26-mdl-photo.is-fallback::before {
  content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(34px, 3.6vw, 52px); font-weight: 300; letter-spacing: .04em; color: var(--navy);
}
/* small "open profile" cue on the photo: shows on hover / focus, always on touch screens */
.ews-cue {
  position: absolute; right: 10px; bottom: 10px; z-index: 1; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--navy);
  box-shadow: 0 8px 18px -10px rgba(14, 42, 79, .55);
  opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.ews-cue .e26-i { width: 16px; height: 16px; stroke-width: 2; }
.ews .e26-mc-card:hover .ews-cue, .ews .e26-mc-card:focus-within .ews-cue { opacity: 1; transform: none; background: var(--navy); color: #fff; }
@media (hover: none) { .ews-cue { opacity: 1; transform: none; } }

.ews .e26-mc-body { display: flex; flex-direction: column; flex: 1; padding: 16px 8px 8px; }
.ews .e26-mc-name { font-family: var(--font); font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--navy); }
.ews .e26-mc-country, .ews-mdl .e26-mc-country { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 500; line-height: 1.4; color: var(--teal-ink); }
.ews .e26-mc-country .e26-i, .ews-mdl .e26-mc-country .e26-i { width: 14px; height: 14px; stroke-width: 1.8; }
.ews .e26-mc-role[hidden], .ews .e26-mc-bio[hidden] { display: none; } /* read by the profile window */

/* the whole card opens the profile */
.ews-open {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 0; margin: 0;
  border: 0; border-radius: 18px; background: none; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.ews-open:focus { outline: none; }
.ews-open:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

@media (max-width: 599px) {
  .ews .e26-mc-card { padding: 7px; border-radius: 16px; }
  .ews-open { border-radius: 16px; }
  .ews .e26-mc-photo { border-radius: 10px; }
  .ews .e26-mc-body { padding: 12px 5px 6px; }
  .ews .e26-mc-name { font-size: 14.5px; }
  .ews .e26-mc-country { font-size: 11.5px; }
  .ews-cue { width: 30px; height: 30px; right: 7px; bottom: 7px; }
  .ews-cue .e26-i { width: 14px; height: 14px; }
}

/* ---------- Scroll reveal (homepage motion: fade + 20px, once) ---------- */
@keyframes ews-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ews-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ews-lb-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .ews.is-js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--rd, 0) * 90ms); }
  .ews.is-js [data-reveal].is-in { opacity: 1; transform: none; }
  .ews.is-js .e26-eyebrow path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .ews.is-js .is-in .e26-eyebrow path { animation: ews-draw 1.4s var(--ease-io) .2s both; }
}

/* ---------- Profile window (homepage .e26-mdl) ---------- */
.ews-mdl { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 28px; }
.ews-mdl[hidden] { display: none; }
.ews-mdl .e26-mdl-backdrop { position: absolute; inset: 0; background: rgba(8, 26, 52, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ews-mdl .e26-mdl-card {
  position: relative; display: flex; align-items: stretch;
  width: min(940px, 100%); max-height: min(680px, calc(100dvh - 56px));
  border-radius: 22px; background: #fff; overflow: hidden;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .55);
}
.ews-mdl .e26-mdl-side {
  flex: 0 0 300px; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 30px 28px;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(143, 220, 214, .28), transparent 70%), linear-gradient(170deg, #f1f8f9 0%, #e9f1f7 100%);
  border-right: 1px solid var(--line);
}
.ews-mdl .e26-mdl-side::after { /* quiet ECG motif under the portrait */
  content: ""; width: 132px; height: 20px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cpath d='M0 10h38l4-5 4 5h8l3 4 5-13 5 16 3-7h10l4-4 4 4h32' fill='none' stroke='%231fa39c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ews-mdl .e26-mdl-photo {
  flex: none; width: 100%; max-width: 244px; aspect-ratio: 370 / 386; border-radius: 16px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .9), 0 22px 40px -24px rgba(14, 42, 79, .55);
}
.ews-mdl .e26-mdl-photo img { object-position: 50% 30%; }
.ews-mdl .e26-mdl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; max-height: min(680px, calc(100dvh - 56px)); }
/* conference logo: small, quiet, stays put while the bio scrolls */
.ews-mdl .ews-mdl-brand { flex: none; padding: 30px 84px 0 36px; }
.ews-mdl .ews-mdl-brand img { display: block; width: 148px; height: auto; mix-blend-mode: multiply; }
.ews-mdl .e26-mdl-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 36px 20px; overscroll-behavior: contain; }
.ews-mdl .e26-mdl-committee { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); padding-right: 40px; }
.ews-mdl .e26-mdl-committee::before { content: ""; flex: none; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--teal), var(--blue)); }
.ews-mdl .e26-mdl-name { margin-top: 10px; font-family: var(--font); font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; line-height: 1.2; letter-spacing: -.018em; color: var(--navy); padding-right: 40px; }
.ews-mdl .e26-mdl-country { margin-top: 8px; font-size: 13.5px; }
.ews-mdl .e26-mdl-role { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--ice); font-size: 14.5px; line-height: 1.6; font-weight: 500; color: var(--navy); }
.ews-mdl .e26-mdl-role[hidden] { display: none; }
.ews-mdl .e26-mdl-bio { margin-top: 18px; font-size: 15px; line-height: 1.75; color: var(--ink); }
.ews-mdl .e26-mdl-bio:empty { display: none; }
.ews-mdl .e26-mdl-bio p { font-size: 15px; line-height: 1.75; color: var(--ink); }
.ews-mdl .e26-mdl-bio p + p { margin-top: .9em; }
.ews-mdl .e26-mdl-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px 16px; border-top: 1px solid var(--line); }
.ews-mdl .e26-mdl-step {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(14, 42, 79, .16); background: #fff; color: var(--navy);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.ews-mdl .e26-mdl-step .e26-i { width: 18px; height: 18px; }
.ews-mdl .e26-mdl-step:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.ews-mdl .e26-mdl-count { font-size: 12.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.ews-mdl .e26-mdl-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(14, 42, 79, .14); background: rgba(255, 255, 255, .92); color: var(--navy);
}
.ews-mdl .e26-mdl-close .e26-i { width: 18px; height: 18px; }
.ews-mdl .e26-mdl-close:hover { background: var(--navy); color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .ews-mdl.is-open .e26-mdl-backdrop { animation: ews-fade .35s var(--ease) both; }
  .ews-mdl.is-open .e26-mdl-card { animation: ews-lb-in .5s var(--ease) both; }
  .ews-mdl .e26-mdl-scroll.is-swap { animation: ews-fade .35s var(--ease) both; }
}
@media (max-width: 719px) {
  .ews-mdl { padding: 12px; align-items: end; }
  .ews-mdl .e26-mdl-card { flex-direction: column; max-height: calc(100dvh - 24px); border-radius: 20px; }
  .ews-mdl .e26-mdl-side { flex: none; flex-direction: row; align-items: center; padding: 20px 64px 4px 20px; background: none; border-right: 0; }
  .ews-mdl .e26-mdl-side::after { display: none; }
  .ews-mdl .e26-mdl-photo { width: 96px; max-width: none; border-radius: 14px; box-shadow: 0 0 0 4px #fff, 0 12px 24px -16px rgba(14, 42, 79, .55); }
  .ews-mdl .e26-mdl-photo.is-fallback::before { font-size: 28px; }
  .ews-mdl .e26-mdl-main { flex: 1 1 auto; min-height: 0; max-height: none; }
  /* phones: logo sits beside the photo, between it and the close button */
  .ews-mdl .ews-mdl-brand { position: absolute; top: 20px; left: 132px; right: 64px; height: 96px; padding: 0; display: flex; align-items: center; }
  .ews-mdl .ews-mdl-brand img { width: 112px; max-width: 100%; }
  .ews-mdl .e26-mdl-scroll { padding: 18px 20px 14px; }
  .ews-mdl .e26-mdl-nav { padding: 10px 16px 14px; }
}
html.ews-lock, html.ews-lock body { overflow: hidden; }
