/* =======================================================================================
   SWCES — Southwest Cancer Engineering Symposium — Global Styles
   -----------------------------------------------------------------------
   Forked from McGheeLab Website, adapted with a LIGHT theme + SWCES sunset palette.

   HOW THIS FILE IS ORGANIZED
   01) Design Tokens & Resets
   02) Base Elements & Utilities
   03) Header (Fixed Top Banner + Nav Drawer)
   04) Hero (Video background + headline)
   05) Subnav (Sticky "chips" quick links)
   06) Page Layout, Cards, Grids, Media blocks
   07) Components (Board, Sessions, Badges, Forms)
   08) Footer
   09) Projects / Sessions (Thumb sizing)
   10) SVG Loader / Logo Animation
   11) Responsive Breakpoints
   12) Reduced Motion
   13) Header Logo Overrides (keep logo stable)

   TIP: CSS variables (custom properties) live in :root and are reused throughout.
   ======================================================================================= */


/* =========================================
   01) DESIGN TOKENS & RESETS
   - Tokens: colors, radii, shadows, layout constants.
   - Resets: box sizing + full-height base.
   ========================================= */
:root{
  /* ---- SWCES Light Theme — Sunset Palette ---- */
  --bg: #FAFAFA;              /* Page background (warm white) */
  --surface: #FFFFFF;         /* Surface for cards/overlays */
  --surface-2: #F0EDEA;       /* Secondary surface (buttons, hover) */
  --text: #1E3A5F;            /* Primary text (SWCES Deep Blue) */
  --muted: #5A6B80;           /* Muted text color */
  --accent: #C05A20;          /* Accent (SWCES warm orange) */
  --link: #1E3A5F;            /* Link color (deep blue) */

  /* ---- Semantic colors ---- */
  --danger: #c62828;
  --success: #2e7d32;
  --warning: #e65100;

  /* ---- Loader/animated logo colors ---- */
  --loader-text-color: #1E3A5F;
  --loader-dot-color:  #C05A20;
  --loader-bg:         #FAFAFA;

  /* ---- Radii/Shadows ---- */
  --radius: 12px;
  --shadow: 0 4px 20px rgba(30,58,95,.08);

  /* ---- Layout constants ---- */
  --banner-height: 64px;   /* JS updates this at runtime for sticky offsets */
  --content-max: 1100px;   /* Comfortable reading width */
  --tab-bar-height: 60px;  /* Mobile bottom tab bar */
}

/* Make width/height calculations include padding/border by default */
*{ box-sizing: border-box; }

/* Allow percentage-based children (e.g., full-height sections) */
html,body{ height:100%; }

/* Reserve scrollbar space so expanding content doesn't shift layout (desktop only) */
@media (min-width: 701px) {
  html{ scrollbar-gutter: stable; }
}

/* Global body defaults */
body{
  margin:0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6; /* Good readability */
  font-size: clamp(0.9375rem, 0.875rem + 0.25vw, 1.0625rem); /* 15px → 17px fluid */
}


/* =========================================
   02) BASE ELEMENTS & UTILITIES
   - Helpers that you’ll reuse across pages.
   ========================================= */

/* Center content and add fluid side padding */
.max-w{
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* "Skip to content" link for keyboard users/screen readers */
.skip-link{
  position: absolute;
  left: -999px;       /* hide off-screen until focused */
  top: auto;
}
.skip-link:focus{
  left: 16px;
  top: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 1000;
}

/* Links: keep clean, add underline on hover for clarity */
a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* A readable, modern default (also set in original CSS) */
html{
  font-family: 'Figtree', sans-serif;
  line-height: 1.5;
}

/* Normalize inline SVGs so they fill their containers */
svg{
  width: 100%;
  height: 100%;
  display: block;
}


/* =========================================
   03) HEADER (FIXED TOP BANNER + NAV DRAWER)
   - Banner is fixed and always visible.
   - Drawer slides under banner for primary navigation.
   ========================================= */

/* Fixed top banner: always at the top */
.top-banner{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;                     /* On top of subnav/drawer */
  height: var(--banner-height);
  display: grid;
  grid-template-columns: 1fr auto auto;  /* Brand left, user btn, menu button right */
  gap: .5rem;
  align-items: center;
  background: rgba(255,255,255,.85);   /* Light translucent + blur */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30,58,95,.1);
  padding-inline: clamp(12px, 3vw, 24px);
}

/* Optional logo container styles (kept for compatibility) */
.logo-svg{ height: 40px; max-width: 20vw; width: auto; display: block; color: var(--text); }
.logo{ display: inline-flex; align-items: center; }

/* Hamburger button: square, rounded, easy tap target */
/* Header user button */
.header-user-btn{
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .5rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 500;
  transition: background .15s;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
  height: 34px;
}
.header-user-btn:hover{ background: rgba(30,58,95,.06); }
.header-user-icon{ flex-shrink: 0; width: 18px; height: 18px; }
.header-user-name{ overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.header-user-name:empty{ display: none; }

/* When logged in, show avatar instead of icon */
.header-user-btn.has-photo .header-user-icon{ display: none; }
.header-user-avatar{
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Hide name on small screens, show only icon/avatar */
@media (max-width: 480px) {
  .header-user-name { display: none; }
  .header-user-btn { padding: .25rem .4rem; }
}

.hamburger{
  width: 44px; height: 44px;
  border: 0;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2);
  cursor: pointer;
}

/* Three bars of the hamburger icon */
.hamburger span{
  display:block;
  width: 20px; height: 2px;
  background: var(--text);
  margin:3px 0;
  transition: transform .25s ease, opacity .25s ease;
}

/* When menu is open, animate to an “X” */
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translateY(5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }

/* Drawer nav sits directly under the fixed banner */
.nav-drawer{
  position: fixed;
  top: var(--banner-height); right: 0; left: 0;
  transform: translateY(-120%);      /* Hidden by default (slides down) */
  transition: transform .25s ease;
  background: rgba(13,17,26,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px;
  z-index: 95;                       /* Under banner, above subnav */
}

/* When “open” class is added by JS, show the drawer */
.nav-drawer.open{ transform: translateY(0); }

/* Drawer nav list basics */
.nav-drawer ul{
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.nav-drawer a{
  display: block;
  padding: 10px 8px;
  border-radius: 8px;
}

/* Current page link highlighted */
.nav-drawer a[aria-current="page"]{
  background: rgba(91,209,185,.12);
}


/* =========================================
   03b) DESKTOP INLINE NAV + DROPDOWNS
   - Horizontal nav in the top banner (≥768px only).
   - Groups use dropdown menus on hover/click.
   ========================================= */
.desktop-nav{ display: none; }  /* Hidden by default (mobile-first) */

@media (min-width: 768px){
  /* Show inline nav, hide hamburger + drawer */
  .desktop-nav{
    display: flex;
    align-items: center;
  }

  .desktop-nav > ul{
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 2px;
    align-items: center;
  }

  /* ─── Desktop Nav Links (professional conference style) ─── */
  .desktop-nav a,
  .nav-group-btn{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: color .15s, background .15s;
    font-family: inherit;
    letter-spacing: .01em;
    position: relative;
  }
  .desktop-nav a:hover,
  .nav-group-btn:hover{
    color: #C05A20;
    background: rgba(192,90,32,.06);
    text-decoration: none;
  }
  /* Active page indicator — subtle bottom bar */
  .desktop-nav a[aria-current="page"]{
    color: #C05A20;
    font-weight: 600;
  }
  .desktop-nav a[aria-current="page"]::after{
    content: '';
    position: absolute;
    bottom: 0; left: 16px; right: 16px;
    height: 2px;
    background: #C05A20;
    border-radius: 2px;
  }

  /* (Chevron / dropdown styles removed — nav is now flat inline links) */

  /* Legacy: keep .nav-group-btn .chevron rule in case old markup is cached */
  .nav-group-btn .chevron{
    width: 10px; height: 10px;
    display: inline-block;
    transition: transform .2s ease;
    flex-shrink: 0;
    opacity: .5;
  }
  .nav-group-btn:hover .chevron{
    opacity: .8;
  }
  .nav-group.open .nav-group-btn .chevron{
    transform: rotate(180deg);
    opacity: .8;
  }

  /* Group button active when child page is current */
  .nav-group-btn.group-active{
    color: #C05A20;
    font-weight: 600;
  }

  /* ─── Dropdown panel (refined light theme) ─── */
  .nav-group{
    position: relative;
  }
  .nav-dropdown{
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: -4px;
    min-width: 180px;
    padding: 6px;
    background: #fff;
    z-index: 200;
    list-style: none;
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(30,58,95,.08);
    box-shadow: 0 8px 32px rgba(30,58,95,.12), 0 1px 3px rgba(30,58,95,.06);
  }
  /* Remove the old pseudo-element panel */
  .nav-dropdown::after{
    display: none;
  }
  .nav-group.open .nav-dropdown{
    display: block;
    animation: nav-dropdown-in .15s ease;
  }
  @keyframes nav-dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .nav-dropdown a{
    display: block;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 450;
    color: var(--text);
    transition: background .12s, color .12s;
  }
  .nav-dropdown a:hover{
    background: rgba(192,90,32,.06);
    color: #C05A20;
  }

  /* Update banner grid: brand | nav (flex) | user btn */
  .top-banner{
    grid-template-columns: auto 1fr auto;
    gap: .75rem;
  }

  /* Hide hamburger + old drawer on desktop */
  .hamburger{ display: none !important; }
  .nav-drawer{ display: none !important; }
}


/* =========================================
   03c) MOBILE BOTTOM TAB BAR + GROUP SHEETS
   - Fixed bottom bar with group tabs.
   - Each group tab opens a bottom sheet with sub-links.
   ========================================= */
.bottom-tabs{ display: none; }
.group-sheet{ display: none; }

@media (max-width: 767px){
  /* Hide hamburger + old drawer on mobile (bottom tabs replace them) */
  .hamburger{ display: none !important; }
  .nav-drawer{ display: none !important; }

  /* Update banner grid: just brand + user btn */
  .top-banner{
    grid-template-columns: 1fr auto;
  }

  /* Bottom tab bar — pinned to viewport bottom.
     Uses solid background (not backdrop-filter) to avoid
     mobile Safari fixed-positioning bugs during toolbar transitions. */
  .bottom-tabs{
    display: flex;
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    margin: 0;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0));
    background: #FFFFFF;
    border-top: 1px solid rgba(30,58,95,.1);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
  }

  .tab-item{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    border: none;
    background: none;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: .02em;
    cursor: pointer;
    min-width: 52px;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .tab-item:hover{ text-decoration: none; }
  .tab-item svg{
    width: 22px; height: 22px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tab-item.active,
  .tab-item[aria-current="page"]{
    color: var(--accent);
  }

  /* Push page content above the tab bar */
  .site-footer{ padding-bottom: 80px; }

  /* === Group bottom sheets (shared pattern) === */
  .group-sheet{
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
  }
  .group-sheet.open{
    pointer-events: auto;
    opacity: 1;
  }
  .group-sheet-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
  }
  .group-sheet-content{
    position: absolute;
    bottom: calc(var(--tab-bar-height) + env(safe-area-inset-bottom, 0));
    left: 0; right: 0;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform .25s ease;
    max-height: 60vh;
    overflow-y: auto;
  }
  .group-sheet.open .group-sheet-content{
    transform: translateY(0);
  }
  .group-sheet-handle{
    width: 36px; height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
    margin: 0 auto 16px;
  }
  .group-sheet ul{
    list-style: none;
    padding: 0; margin: 0;
    display: grid; gap: 4px;
  }
  .group-sheet a{
    display: block;
    padding: 14px 12px;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    transition: background .15s;
  }
  .group-sheet a:hover,
  .group-sheet a[aria-current="page"]{
    background: rgba(91,209,185,.12);
  }
}


/* =========================================
   04) HERO (VIDEO BACKGROUND + HEADLINE)
   - Sits under banner; margin-top equals banner height.
   - Contains background video with a subtle overlay (scrim).
   ========================================= */
.hero{
  position: relative;
  overflow: hidden;
  margin-top: var(--banner-height);
  min-height: clamp(420px, 60vh, 750px);
  display: grid;
  align-content: end;
}

/* Procedural mountain landscape canvas */
.hero-bg{
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
}

/* Gradient scrim: transparent top, dark bottom for white text over canvas */
.hero-scrim{
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(15,12,30, 0) 0%,
    rgba(15,12,30, 0) 40%,
    rgba(15,12,30, .15) 60%,
    rgba(15,12,30, .45) 82%,
    rgba(15,12,30, .65) 100%
  );
}

/* Inner hero content container */
.hero-content{
  position: relative; z-index: 2;
  padding: clamp(32px, 6vw, 72px) 0;
  color: #fff;
}

/* Section eyebrow/subtitle */
.eyebrow{
  text-transform: uppercase;
  letter-spacing: .2em;
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  font-weight: 600;
  margin: 0 0 12px;
}

/* Main hero heading */
.hero h1{
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  line-height: 1.15;
  max-width: 20ch;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}

/* Hero subtitle / event details */
.hero-meta{
  margin: 12px 0 0;
  font-size: clamp(.85rem, 1.5vw, 1.05rem);
  color: rgba(255,255,255,.75);
  font-weight: 400;
  letter-spacing: .02em;
}

/* Hero CTA buttons */
.hero-actions{
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hero-btn{
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
  letter-spacing: .01em;
}
.hero-btn--primary{
  background: #C05A20;
  color: #fff;
  box-shadow: 0 2px 8px rgba(192,90,32,.3);
}
.hero-btn--primary:hover{
  background: #A84D1A;
  box-shadow: 0 4px 16px rgba(192,90,32,.4);
  transform: translateY(-1px);
}
.hero-btn--secondary{
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}
.hero-btn--secondary:hover{
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.4);
  transform: translateY(-1px);
}

/* Optional: highlight part of the mission with pink as requested */
.hero .hero-highlight{
  color: #ff5bb5;
  font-weight: 700;
}


/* =========================================
   05) SUBNAV (STICKY "CHIPS" QUICK LINKS)
   - Sits right below the fixed banner on every page.
   - Scrollable on small screens, wraps on large screens.
   ========================================= */
.subnav{
  position: sticky;
  top: var(--banner-height);
  z-index: 90;
  background: var(--surface);
  border-bottom: 1px solid rgba(30,58,95,.1);
  padding: 0;
  margin-bottom: 0;
}

/* Horizontal, swipeable chip row */
.subnav .track{
  list-style: none; margin: 0;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex; gap: 4px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.subnav .track::-webkit-scrollbar{ display: none; }

.subnav li{ flex: 0 0 auto; scroll-snap-align: start; }

.subnav a{
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 0;
  white-space: nowrap;
  background: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  text-decoration: none;
}
.subnav a:hover{
  color: var(--text);
  background: none;
  text-decoration: none;
}

/* Active chip — accent underline */
.subnav a.is-active,
.subnav a[aria-current="true"]{
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Gradient edge hints for overflow */
.subnav::before,
.subnav::after{
  content:"";
  position:absolute; top:0; bottom:0;
  width:36px; pointer-events:none;
}
.subnav::before{
  left:0;
  background: linear-gradient(90deg, var(--surface), transparent);
}
.subnav::after{
  right:0;
  background: linear-gradient(270deg, var(--surface), transparent);
}


/* =========================================
   06) PAGE LAYOUT, CARDS, GRIDS, MEDIA BLOCKS
   - Generic page spacing + reusable card/grid/media patterns.
   ========================================= */

/* Outer padding for page content area */
.page{ padding-block: clamp(24px, 5vw, 48px); }

/* Vertical spacing between sections */
.section{ margin-bottom: clamp(24px, 5vw, 56px); }

/* Section headings */
.section h2{
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  margin: 0 0 12px;
}

/* Reveal-on-scroll animation (JS toggles .is-visible) */
.reveal{
  opacity: 0;
  transform: translateY(14px) scale(.98);
  filter: blur(2px);
}
.reveal.is-visible{
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity .5s ease, transform .5s ease, filter .5s ease;
}

/* Card look shared by many blocks */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Basic CSS grid helper */
.grid{ display: grid; gap: clamp(12px, 2.3vw, 24px); }

/* Grid that fits as many ~240px-wide items as possible (220px on narrow phones) */
.grid-fit-250{ grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }

/* Team grids use auto-fill so cards stay consistent size even with fewer items */
.team-grid{ grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }

/* Two-column media layout: text + image/video */
.media{
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: clamp(12px, 2.2vw, 28px);
  align-items: start;
}
/* Images inside media: full width, rounded, subtle border */
.media img{
  width: 100%; height: auto;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(255,255,255,.06);
}
/* Videos inside media: match image styling */
.media video{
  width: 100%; height: auto;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(255,255,255,.06);
}
/* Embedded Google Map inside media */
.media .mission-map{
  width: 100%;
  min-height: 300px;
  height: 100%;
  border: none;
  border-radius: 12px;
  display: block;
}


/* =========================================
   07) COMPONENTS (TEAM, CLASSES, BADGES, FORMS)
   - Small building blocks used across pages.
   ========================================= */

/* Team member card — horizontal: photo left (1/3), info right (2/3) */
.person{
  padding: .75rem;
  overflow: hidden;
}
.person-layout{
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: .75rem;
  align-items: start;
}
.person-photo{
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.person-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.person-info{
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.person .role{
  color: var(--muted);
  font-size: .85rem;
}

/* ── PI card: same 1/3 photo layout as other team cards ── */
.pi-card{ padding: .75rem; }
.pi-layout{
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: .75rem;
  align-items: start;
}
.pi-photo{
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.pi-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pi-info{
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.pi-info strong{ font-size: 1.15rem; }
.pi-footer{
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: .5rem;
}
.pi-role{
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent, #60a5fa);
  margin-bottom: .5rem;
}
.pi-bio{
  max-height: calc(8 * 1.6 * .9rem);
  overflow-y: auto;
}
.pi-bio p{
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text, #eef2f7);
  margin: .5rem 0 .75rem;
}
.pi-details{
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 1rem;
}
/* PI CV-style sections (legacy — kept for compat) */
.pi-cv-section{
  margin-bottom: 1rem;
}
.pi-cv-section h4{
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted, #a8b3c7);
  margin: 0 0 .35rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.pi-cv-links{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

/* ── PI CV filter bar ── */
.pi-cv-filter{
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.pi-cv-chip{
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 500;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted, #a8b3c7);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.pi-cv-chip:hover{
  background: rgba(255,255,255,.08);
  color: var(--text, #eef2f7);
}
.pi-cv-chip.is-active{
  background: rgba(91,174,209,.18);
  border-color: rgba(91,174,209,.4);
  color: var(--accent, #5baed1);
}

/* ── PI CV item metadata ── */
.pi-cv-year{
  font-size: .78rem;
  color: var(--muted, #a8b3c7);
  margin-left: .3rem;
}
.pi-cv-citation{
  display: inline-block;
  padding: .1rem .4rem;
  margin-left: .35rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 600;
  background: rgba(124,196,255,.12);
  color: var(--link, #7cc4ff);
  white-space: nowrap;
  vertical-align: middle;
}
.pi-cv-meta{
  display: block;
  font-size: .78rem;
  color: var(--muted, #a8b3c7);
  margin-top: .1rem;
  font-style: italic;
}

/* Detail sections within PI expanded view */
.pi-cv-detail-section{
  margin-bottom: .75rem;
}
.pi-cv-detail-section .team-stories-list li{
  padding: .4rem 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.pi-cv-detail-section .team-stories-list li:last-child{
  border-bottom: none;
}
@media (max-width: 600px) {
  .pi-layout{ gap: .5rem; }
}

/* ── Team card badges ── */
.team-badges{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .4rem 0;
}
.team-badge{
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .15rem .45rem;
  border-radius: 100px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: .7rem;
  color: var(--muted, #a8b3c7);
  white-space: nowrap;
  line-height: 1;
}
.team-badge svg{
  flex-shrink: 0;
  opacity: .7;
}
.team-badge-link{
  text-decoration: none;
  color: var(--accent, #60a5fa);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.team-badge-link:hover{
  background: rgba(96,165,250,.12);
  border-color: var(--accent, #60a5fa);
}

/* ── Team expanded <details> sections ── */
.team-expanded-section summary{
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.team-expanded-section summary::-webkit-details-marker{ display: none; }
.team-expanded-section summary h4{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent, #60a5fa);
  margin: 0;
  padding: .35rem 0;
  transition: color .15s;
}
.team-expanded-section summary h4::after{
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  margin-left: .25rem;
  transition: transform .2s ease;
}
.team-expanded-section[open] summary h4::after{
  transform: rotate(180deg);
}
.team-expanded-section summary:hover h4{ color: var(--text, #eef2f7); }
.team-expanded-section summary h4 svg{
  width: 14px; height: 14px; flex-shrink: 0;
}
.team-expanded-section[open] summary h4{
  color: var(--text, #eef2f7);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: .35rem;
  margin-bottom: .35rem;
}

/* ── Team card expand/learn more button ── */
.team-expand{
  background: transparent;
  color: var(--accent, #60a5fa);
  border: 1px solid var(--accent, #60a5fa);
  padding: .3rem .8rem;
  font-size: .8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
  margin-top: .25rem;
}
.team-expand:hover{
  background: var(--accent, #60a5fa);
  color: #031a16;
}

/* Active card highlight */
.team-card-active{
  border-color: var(--accent, #60a5fa);
  box-shadow: 0 0 0 2px rgba(96,165,250,.3);
}

/* ── Shared detail panel (inside grid, spans full row) ── */
.team-detail-panel{
  grid-column: 1 / -1;
  position: relative;
  margin-top: .25rem;
}
.team-detail-arrow{
  position: absolute;
  top: -8px;
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-bottom: none;
  border-right: none;
  transform: rotate(45deg);
  z-index: 2;
  transition: left .25s ease;
}
.team-detail-card{
  position: relative;
  padding: 1.5rem;
  z-index: 1;
}
.team-detail-close{
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--muted, #a8b3c7);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.team-detail-close:hover{
  background: rgba(255,255,255,.12);
  color: var(--text, #eef2f7);
}
.team-detail-content h3{
  margin: 0 0 .25rem;
  color: var(--text, #eef2f7);
}

/* ── Shared expanded content styles ── */
.team-bio p{
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text, #eef2f7);
  margin: .5rem 0 .75rem;
}
.team-expanded-section{
  margin-bottom: .75rem;
}
.team-expanded-section h4{
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted, #a8b3c7);
  margin: 0 0 .35rem;
}
.team-stories-list{
  list-style: none;
  padding: 0;
  margin: 0;
}
.team-stories-list li{
  padding: .3rem 0;
  font-size: .85rem;
}
.team-stories-list a{
  color: var(--accent, #60a5fa);
  text-decoration: none;
}
.team-stories-list a:hover{ text-decoration: underline; }
.team-stories-list .hint{
  color: var(--muted, #a8b3c7);
  font-size: .8rem;
  margin-left: .4rem;
}

/* Course/Generic item spacing within cards */
.class-item{ padding: 16px; }

/* Small rounded pill for metadata (levels, tags, etc.) */
.badge{
  display:inline-block;
  padding: 6px 10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:100px;
  font-size:.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Forms: consistent controls and spacing */
form{ display: grid; gap: 12px; }
input, textarea, select, button{ font: inherit; color: var(--text); }

/* Inputs/Textareas/Selects share the same surface look */
input, textarea, select{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 12px;
}
select option{
  background: var(--surface, #FFFFFF);
  color: var(--text, #eef2f7);
}
textarea{ min-height: 120px; resize: vertical; }

/* Primary button uses accent color */
button{
  background: var(--accent);
  color: #031a16;           /* Dark text on light accent */
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}
button:hover{ filter: brightness(1.2); } /* Subtle hover lift */

a.btn{
  display: inline-block;
  background: var(--accent);
  color: #000000;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
}
a.btn:hover{
  filter: brightness(1.2);
  text-decoration: none;
}

/* =========================================
   08) FOOTER
   - Simple three-column layout on large screens;
     stacks to one column on small screens.
   ========================================= */
.site-footer{
  background: #1E3A5F;
  color: #eef2f7;
  border-top: 1px solid rgba(30,58,95,.15);
}

/* Main footer grid */
.footer-grid{
  display: grid; gap: 18px;
  padding-block: clamp(20px, 4vw, 36px);
  grid-template-columns: 2fr 1fr 2fr;  /* Left/Center/Right */
}

.footer-heading{
  margin: 0 0 8px;
  font-size: 1rem;
  color: rgba(238,242,247,.6);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.footer-links{
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.footer-links a{
  color: rgba(238,242,247,.8);
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover{
  color: #fff;
}
.site-footer address{
  color: rgba(238,242,247,.7);
  font-style: normal;
  line-height: 1.7;
}
.site-footer address a{
  color: rgba(238,242,247,.8);
}

/* Legal strip at the very bottom */
.legal{
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 10px 0;
  text-align: center;
  color: rgba(238,242,247,.7);
}


/* =========================================
   09) PROJECTS (CONSISTENT THUMBNAIL SIZING)
   - Ensure cards use the same aspect ratio for images.
   ========================================= */
.project-card .thumb{
  width: 100%;
  aspect-ratio: 16/9;                 /* Consistent visual rhythm */
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: 10px;
}
.project-card .thumb img{
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}


/* =========================================
   10) SVG LOADER / LOGO ANIMATION
   - Keeps original animated wordmark behavior.
   - The "text-body" strokes in, then fills; the "dot" fades in.
   ========================================= */

/* Defaults for larger screens (scales with viewport) */
svg text{
  font-size: 3vw;        /* Scales with viewport width */
  max-height: 1vw;       /* Keeps strokes slim on large screens */
  stroke-width: 1;
  letter-spacing: -2px;
}

html {
    font-family: 'Figtree', sans-serif;

}

/* Animated stroke for the main text */
svg text.text-body{
  stroke: var(--loader-text-color);
  animation: 4s animate-stroke alternate ease-in-out infinite;
}

/* The dot (•) fills/fades */
svg text.dot{
  fill: var(--loader-dot-color);
  stroke: var(--loader-dot-color);
  animation: 4s animate-dot alternate ease-in-out infinite;
}

/* Keyframes for the stroke animation */
@keyframes animate-stroke{
  0%{
    fill: transparent;
    stroke: var(--loader-text-color);
    stroke-width: 1;
    stroke-dasharray: 0 32%;
    stroke-dashoffset: 25;
  }
  50%{
    fill: transparent;
    stroke: var(--loader-text-color);
    stroke-width: 3;
    stroke-dasharray: 50% 0;
    stroke-dashoffset: 0;
  }
  80%,100%{
    fill: var(--loader-text-color);
    stroke: 20;                 /* legacy value retained */
    stroke-width: 0;
    stroke-dasharray: 32 0%;
    stroke-dashoffset: -25%;
  }
}

/* Keyframes for the dot fade-in */
@keyframes animate-dot{
  0%,50%{
    fill: var(--loader-dot-color);
    opacity: 0;
  }
  80%,100%{
    fill: var(--loader-dot-color);
    opacity: 1;
  }
}


/* =========================================
   11) RESPONSIVE BREAKPOINTS
   - Tweak layouts/typography for smaller screens.
   ========================================= */

/* Subnav wraps on wider screens (no scroll needed) */
@media (min-width: 769px){
  .subnav .track{ overflow: visible; flex-wrap: wrap; }
  .subnav::before, .subnav::after{ display: none; }
}

/* Stack two-column media & footer on tablets/phones */
@media (max-width: 768px){
  .media{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }

  /* Skip hero video on mobile — saves bandwidth, barely visible at 20% opacity */
  .hero video{ display: none; }

}

/* Phone-sized adjustments */
@media (max-width: 600px){
  .hero{ min-height: 360px; }
  .hero-actions{ flex-direction: column; gap: 10px; }
  .hero-btn{ text-align: center; justify-content: center; padding: 12px 20px; }
  .logo-svg{ height: 38px; }  /* Legacy logo size hook */

  /* Scale animated SVG text for small screens */
  svg text{
    font-size: 10vw;
    max-height: 2vw;
    stroke-width: 0.8;
    letter-spacing: -1px;
  }

  /* Full-width cards on very small screens */
  .grid-fit-250{ grid-template-columns: 1fr; }
}

/* Medium screens: gently reduce SVG text size */
@media (max-width: 992px){
  svg text{
    font-size: 4vw;
    max-height: 1.5vw;
    stroke-width: 0.9;
    letter-spacing: -1.5px;
  }
}


/* =========================================
   12) REDUCED MOTION
   - Respect user's OS preference to minimize motion.
   ========================================= */
@media (prefers-reduced-motion: reduce){
  .hero video{ display: none; }              /* Remove moving background */
  .reveal{ opacity: 1; transform: none; filter: none; } /* Disable reveal */
  .group-sheet-content{ transition: none; }   /* No sheet animation */
  .group-sheet{ transition: none; }
}


/* =========================================
   13) HEADER LOGO OVERRIDES (KEEP LOGO STABLE)
   - The animated logo in the fixed header should NOT be affected
     by the global responsive SVG rules above. Keep it a fixed size.
   ========================================= */
.top-banner .logo-animated,
.top-banner .logo-cactus{
  height: 40px;
  width: auto;
  display: block;
}

.top-banner .logo-cactus text{
  font-size: 72px;
  letter-spacing: -1px;
}


/* =========================================
   14) Z-INDEX SAFETY (LAYER ORDER)
   - Ensure the proper stacking of header, nav drawer, and subnav.
   ========================================= */
.top-banner   { z-index: 100; }  /* Highest */
.bottom-tabs  { z-index: 100; }  /* Same level as banner */
.group-sheet  { z-index: 110; }  /* Above tab bar */
.nav-dropdown { z-index: 200; }  /* Desktop dropdown above everything */
.nav-drawer   { z-index: 95;  top: var(--banner-height); } /* Under banner */
.subnav       { z-index: 90;  top: var(--banner-height); } /* Under drawer */

/* Ensure hero never slides under the fixed banner */
.hero { margin-top: var(--banner-height); }


/* =========================================
   15) PWA — Install Banner, Notification Prompt, Toast, Standalone
   ========================================= */

/* --- Standalone mode (installed PWA, no browser chrome) --- */
@media (display-mode: standalone) {
  .top-banner {
    padding-top: env(safe-area-inset-top, 0);
  }
  .hero {
    margin-top: calc(var(--banner-height) + env(safe-area-inset-top, 0));
  }
}

/* --- Apps environment: hide site chrome on mobile ----------- */
/* Hub page (#/apps): hide bottom tabs so app grid gets full space */
body.apps-env .bottom-tabs { display: none !important; }
body.apps-env .group-sheet { display: none !important; }

/* Embedded app (#/apps/{id}): on mobile hide top banner and lock body —
   parent bottom nav and iframe handle everything */
@media (max-width: 700px) {
  body.apps-embedded .top-banner { display: none !important; }
  body.apps-embedded {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
}

/* --- Install banner (compact, single-row) --- */
.pwa-install-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2, #F0EDEA);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-size: .8rem;
}
.pwa-install-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}
.pwa-install-text {
  flex: 1;
  color: var(--muted, #a8b3c7);
  line-height: 1.35;
  min-width: 0;
}
.pwa-install-text strong {
  color: var(--text, #eef2f7);
}
.pwa-install-btn {
  padding: 5px 12px;
  background: var(--accent, #5baed1);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-install-btn:hover { opacity: 0.9; }
.pwa-install-dismiss {
  background: none;
  border: none;
  color: var(--muted, #a8b3c7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  flex-shrink: 0;
}
.pwa-install-dismiss:hover { color: var(--text, #eef2f7); }

/* --- Notification permission prompt --- */
.pwa-notif-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2, #F0EDEA);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.pwa-notif-content {
  flex: 1;
}
.pwa-notif-content p {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--muted, #a8b3c7);
}
.pwa-notif-btn {
  padding: 8px 18px;
  background: var(--accent, #5baed1);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-notif-btn:hover { opacity: 0.9; }

/* --- Toast (update notification, push foreground) --- */
.pwa-toast {
  position: fixed;
  bottom: calc(var(--tab-bar-height, 60px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface, #FFFFFF);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius, 12px);
  padding: 12px 16px;
  box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,0.4));
  z-index: 9999;
  max-width: 420px;
  width: calc(100% - 32px);
  animation: pwa-toast-in 0.3s ease-out;
}
.pwa-toast-body {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text, #eef2f7);
}
.pwa-toast-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.pwa-toast-action {
  padding: 6px 14px;
  background: var(--accent, #5baed1);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.pwa-toast-action:hover { opacity: 0.9; }
.pwa-toast-close {
  background: none;
  border: none;
  color: var(--muted, #a8b3c7);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
}
.pwa-toast-close:hover { color: var(--text, #eef2f7); }

@keyframes pwa-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* In standalone mode, adjust toast for no tab bar */
@media (display-mode: standalone) {
  .pwa-toast {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
}

/* ================================================================
   THEME PAGE (Scientific Themes)
   ================================================================ */
.theme-card { padding: clamp(1rem, 3vw, 2rem); }

.theme-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.theme-keyword {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(192, 90, 32, 0.1);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.theme-chair {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}
.theme-chair-affiliation { color: var(--muted); }

.theme-speakers { margin-top: 0.75rem; }
.theme-speaker-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.theme-speaker-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
}
.theme-speaker-name { font-weight: 600; color: var(--text); }
.theme-speaker-aff  { font-size: 0.85rem; color: var(--muted); }
.theme-speaker-talk {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
  flex-basis: 100%;
}
.theme-speakers-tbd {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.75rem;
}

/* ================================================================
   PROGRAM / SCHEDULE PAGE
   ================================================================ */
.schedule-draft-notice {
  background: rgba(192, 90, 32, 0.08);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.schedule-timeline {
  display: flex;
  flex-direction: column;
  border-left: 3px solid rgba(30, 58, 95, 0.15);
  margin-left: 0.5rem;
  padding-left: 1.5rem;
}

.schedule-block {
  position: relative;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(30, 58, 95, 0.06);
}
.schedule-block:last-child { border-bottom: none; }

/* Timeline dot */
.schedule-block::before {
  content: '';
  position: absolute;
  left: -1.85rem;
  top: 1.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--bg);
}
.schedule-type-keynote::before  { background: var(--accent); width: 12px; height: 12px; left: -1.9rem; }
.schedule-type-session::before  { background: var(--text); }
.schedule-type-break::before    { background: var(--surface-2); border-color: var(--muted); }
.schedule-type-social::before   { background: var(--accent); }
.schedule-type-ceremony::before { background: var(--text); }
.schedule-type-panel::before    { background: var(--accent); }

.schedule-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.schedule-title {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  color: var(--text);
}

.schedule-location {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.4rem;
}
.schedule-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.25rem 0;
  line-height: 1.5;
}

/* Keynote speaker card inside schedule */
.schedule-keynote-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(192, 90, 32, 0.04);
  border: 1px solid rgba(192, 90, 32, 0.1);
  border-radius: 8px;
}
.schedule-speaker-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.schedule-speaker-name { font-weight: 600; display: block; color: var(--text); }
.schedule-speaker-aff  { font-size: 0.85rem; color: var(--muted); display: block; }
.schedule-talk-title   { font-size: 0.9rem; font-style: italic; color: var(--muted); margin: 0.25rem 0 0; }

/* Session talks list */
.schedule-talks {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.schedule-talk {
  padding: 0.4rem 0.75rem;
  background: rgba(30, 58, 95, 0.03);
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.schedule-talk-time {
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.5rem;
  font-size: 0.8rem;
}
.schedule-talk-speaker { font-weight: 500; }
.schedule-talk-aff     { color: var(--muted); font-size: 0.85rem; }

/* Subdued styling for breaks */
.schedule-type-break .schedule-title,
.schedule-type-break .schedule-desc { font-weight: 400; color: var(--muted); }

@media (max-width: 600px) {
  .schedule-timeline { margin-left: 0; padding-left: 1rem; }
  .schedule-keynote-detail { flex-direction: column; align-items: flex-start; }
}

/* ================================================================
   CALLS PAGE (Abstracts, Travel Awards, Sponsorship)
   ================================================================ */
.calls-page {
  padding: 1.5rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}
.calls-page h2 { margin: 0 0 0.25rem; }

.calls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.call-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.call-type-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--accent);
  color: #fff;
  align-self: flex-start;
}

.call-card h3 { margin: 0.5rem 0 0.4rem; color: var(--text); }
.call-card > p { color: var(--text); line-height: 1.6; }

.call-details {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}
.call-details li { margin-bottom: 0.25rem; }

.call-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.75rem 0;
}
.call-deadline strong,
.call-opens strong { color: var(--text); }

.call-cta {
  display: inline-block;
  margin-top: auto;
  padding: 0.5rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.call-cta:hover { background: #A84D1A; }


/* ================================================================
   MEMBERS PAGE
   ================================================================ */

/* Filter bar */
.members-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.members-view-toggle {
  display: flex;
  background: var(--surface-2);
  border-radius: 8px;
  overflow: hidden;
}

.members-view-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.members-view-btn.active {
  background: var(--text);
  color: #fff;
}
.members-view-btn:hover:not(.active) {
  background: rgba(30, 58, 95, 0.08);
}

.members-select {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.members-institution-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Group sections */
.members-group {
  padding: 0.5rem 0 1.5rem;
}

.members-group-title {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(192, 90, 32, 0.2);
}

.members-group-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

/* Members grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* Member card */
.member-card {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(30, 58, 95, 0.08);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.member-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(192, 90, 32, 0.1);
  transform: translateY(-2px);
}

.member-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.member-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--text), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.member-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.member-name {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.3;
}

.member-role {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.member-uni {
  font-size: 0.75rem;
  color: var(--muted);
}

.member-bio-preview {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.member-papers-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(192, 90, 32, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
}

/* ---- Member modal ---- */
.member-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.member-modal[hidden] { display: none; }

.member-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 58, 95, 0.5);
  backdrop-filter: blur(4px);
}

.member-modal-content {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(30, 58, 95, 0.2);
}

.member-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface-2);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.member-modal-close:hover {
  background: rgba(30, 58, 95, 0.1);
  color: var(--text);
}

/* Modal detail sections */
.member-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.member-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.member-detail-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.member-detail-bio {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.member-detail-section {
  margin-bottom: 1.25rem;
}

.member-detail-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(192, 90, 32, 0.15);
}

/* Association list */
.member-association-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.assoc-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.assoc-label {
  font-weight: 600;
  color: var(--text);
  min-width: 90px;
  flex-shrink: 0;
}

.assoc-item span:last-child {
  color: var(--muted);
}

/* Papers list */
.member-papers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.member-papers-list li {
  padding: 0.6rem 0.75rem;
  background: rgba(30, 58, 95, 0.03);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.paper-title {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
  display: block;
  line-height: 1.4;
}

.member-papers-list a {
  text-decoration: none;
}
.member-papers-list a:hover .paper-title {
  color: var(--accent);
  text-decoration: underline;
}

.paper-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: block;
  margin-top: 0.1rem;
}

/* Social links */
.member-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}

.social-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.social-link:hover {
  background: var(--text);
  color: #fff;
  text-decoration: none;
}

/* ---- Schedule enhancements ---- */
.schedule-confirmed-notice {
  background: rgba(46, 125, 50, 0.08);
  color: var(--success);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border-left: 3px solid var(--success);
}

.schedule-chair {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(30, 58, 95, 0.04);
  border-radius: 6px;
  border-left: 3px solid var(--text);
}

/* Improve talk card readability */
.schedule-talk {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
}

.schedule-talk-title {
  display: block;
  width: 100%;
  padding-left: 0;
  margin-top: 0.1rem;
}

/* Social type */
.schedule-type-social .schedule-title {
  color: var(--accent);
}

@media (max-width: 600px) {
  .members-grid {
    grid-template-columns: 1fr;
  }
  .members-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .members-view-toggle {
    justify-content: stretch;
  }
  .members-view-btn {
    flex: 1;
    text-align: center;
  }
  .member-modal-content {
    max-height: 90vh;
    padding: 1.25rem;
  }
}
