/* =========================================================
   TOKENS
   ========================================================= */
:root {
  --teal:          #3D8A7A;
  --teal-light:    #5CB89A;
  --teal-dark:     #0D3D37;
  --olive:         #5A8055;
  --steel:         #6BB5C0;
  --peach:         #F4A68A;
  --orange:        #F0893C;
  --orange-dark:   #D9762A; /* palette orange, darkened for hover + text contrast */
  --cream:         #FDDCAB;
  --steel-dark:    #2E7A87; /* palette steel, darkened for text contrast */
  --bg:            #FFFFFF;
  --bg-alt:        #F5F9F7;
  --surface:       rgba(255, 255, 255, 0.97);
  --surface-solid: #FFFFFF;
  --border:        rgba(61, 138, 122, 0.18);
  --border-strong: rgba(61, 138, 122, 0.35);
  --text:          #0D3D37;
  --muted:         #5A7A75;
  --header-h:      64px;
  --togglebar-h:   0px;  /* event toggle bar removed — kept at 0 for sticky offsets */
  --tabnav-h:      48px;
  --panel-w:       420px;
  --radius:        10px;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --transition:    280ms var(--ease);
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Georgia', 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: var(--header-h);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 30;
  background: var(--teal-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo {
  height: 46px;
  max-height: 46px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}


.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.header-nav a {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: color 150ms, background 150ms, border-color 150ms;
}

.header-nav a:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

/* =========================================================
   EVENT TOGGLE BAR
   ========================================================= */
.event-toggle-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 28;
  height: var(--togglebar-h);
  background: var(--teal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.event-toggle-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.event-toggle-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
}

.event-toggle-tag {
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--cream);
  border-radius: 4px;
  padding: 0.25em 0.7em;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-toggle-name {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 150ms;
}

.event-toggle-btn:hover { background: rgba(255, 255, 255, 0.25); }

.toggle-arrow {
  display: inline-block;
  transition: transform 250ms var(--ease);
  font-size: 1rem;
  line-height: 1;
}

.event-toggle-btn[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}

/* =========================================================
   EVENT HERO (collapsible)
   ========================================================= */
.event-hero {
  background: var(--teal-dark);
  color: #FFFFFF;
  max-height: 0;
  overflow: hidden;
  transition: max-height 420ms var(--ease);
}

.event-hero.is-open {
  max-height: 760px;
}

.event-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.75rem;
}

.event-label {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 1rem;
}

.event-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: normal;
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: 2rem;
}

.br-desktop { display: inline; }

.event-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.75rem;
}

.event-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.meta-icon {
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.meta-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.meta-label {
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.meta-value {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.event-description {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  max-width: 680px;
  margin-bottom: 2rem;
}

.btn-register {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--orange);
  color: #FFFFFF;
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 150ms, transform 150ms;
}

.btn-register:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

/* =========================================================
   MAIN CONTENT — TAB CONTAINER
   ========================================================= */
.main-content {
  background: var(--bg-alt);
}

/* =========================================================
   TAB NAVIGATION
   ========================================================= */
.tab-nav {
  position: sticky;
  top: calc(var(--header-h) + var(--togglebar-h));
  z-index: 25;
  height: var(--tabnav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  padding: 0 1.5rem;
  gap: 0;
}

.tab-btn {
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 150ms, border-color 150ms;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.is-active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* =========================================================
   TAB PANELS
   ========================================================= */
.tab-panel {
  width: 100%;
}

/* =========================================================
   GLOBE CANVAS CONTAINER
   ========================================================= */
#globe {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-h) - var(--tabnav-h));
  min-height: 480px;
  overflow: hidden;
  background: var(--teal-dark);
}

#globe canvas {
  display: block;
}

#globe-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

/* =========================================================
   PROJECTS GRID
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  padding: 2rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.grid-card-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(13, 61, 55, 0.06);
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
  overflow: hidden;
}

.grid-card-wrap:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(13, 61, 55, 0.12);
}

.grid-card-wrap .project-card {
  padding: 1.25rem 1.25rem 1.5rem;
}

.grid-loading {
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 3rem 1.5rem;
  grid-column: 1 / -1;
  text-align: center;
}

/* University colour accents on grid cards */
.grid-card-wrap.univ-cambridge {
  border-top: 3px solid var(--teal);
}
.grid-card-wrap.univ-cambridge:hover {
  box-shadow: 0 6px 20px rgba(61, 138, 122, 0.18);
}

.grid-card-wrap.univ-lshtm {
  border-top: 3px solid var(--olive);
}
.grid-card-wrap.univ-lshtm:hover {
  box-shadow: 0 6px 20px rgba(90, 128, 85, 0.18);
}

.grid-card-wrap.univ-both {
  border-top: 3px solid var(--steel);
}
.grid-card-wrap.univ-both:hover {
  box-shadow: 0 6px 20px rgba(107, 181, 192, 0.18);
}

/* =========================================================
   MAP HINT (visible only when map tab is active)
   ========================================================= */
#map-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(13, 61, 55, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  padding: 0.5rem 1.25rem;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms var(--ease);
  white-space: nowrap;
}

body.tab-map-active #map-hint { opacity: 1; }
body.tab-map-active #map-hint.hint-hidden { opacity: 0; }

/* =========================================================
   PROJECT PANEL — Desktop (right side panel)
   ========================================================= */
#project-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: var(--panel-w);
  height: calc(100% - var(--header-h));
  z-index: 29; /* above sticky toggle bar (28) and tab nav (25), below header (30) */
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(13, 61, 55, 0.08);
  transform: translateX(100%);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#project-panel.is-open {
  transform: translateX(0);
}

/* =========================================================
   PROJECT PANEL — Mobile (bottom sheet)
   ========================================================= */
@media (max-width: 768px) {
  #project-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 68dvh;
    max-height: 85dvh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(13, 61, 55, 0.1);
    transform: translateY(100%);
  }

  #project-panel.is-open {
    transform: translateY(0);
  }

  .panel-handle { display: block !important; }
}

/* =========================================================
   PANEL INTERNALS
   ========================================================= */
.panel-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: rgba(244, 166, 138, 0.8);
  border-radius: 2px;
  margin: 0.75rem auto 0;
  flex-shrink: 0;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 1rem 0;
  flex-shrink: 0;
}

.panel-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 150ms, color 150ms;
  flex-shrink: 0;
}

.panel-close:hover {
  background: var(--border);
  color: var(--text);
}

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.panel-scroll::-webkit-scrollbar { width: 4px; }
.panel-scroll::-webkit-scrollbar-track { background: transparent; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* =========================================================
   PROJECT CARD
   ========================================================= */
.project-card {
  padding: 0.5rem 1.5rem 2rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.card-location {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-badge {
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 3px;
}

.badge-active    { background: rgba(240,147,60,0.12); color: var(--orange-dark); border: 1px solid rgba(240,147,60,0.3); }
.badge-completed { background: rgba(107,181,192,0.12); color: #2E7A87; border: 1px solid rgba(107,181,192,0.3); }

.univ-badge {
  font-family: system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 3px;
}

.univ-cambridge { background: rgba(61, 138, 122, 0.1);  color: var(--teal);  border: 1px solid rgba(61, 138, 122, 0.25); }
.univ-lshtm     { background: rgba(90, 128, 85, 0.1);   color: var(--olive); border: 1px solid rgba(90, 128, 85, 0.25); }
.univ-both      { background: rgba(107, 181, 192, 0.1); color: var(--steel-dark); border: 1px solid rgba(107, 181, 192, 0.3); }

.project-title {
  font-size: 1.2rem;
  font-weight: normal;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.875rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag {
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: rgba(253, 220, 171, 0.4);
  border: 1px solid rgba(240, 137, 60, 0.25);
  border-radius: 3px;
  padding: 0.2em 0.55em;
}

.project-description {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.section-heading {
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.625rem;
}

.pi-section {
  margin-bottom: 1.5rem;
}

.pi-name {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0;
}

.team-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.team-member {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.team-member:last-child { border-bottom: none; }

.team-name {
  font-size: 0.85rem;
  color: var(--text);
}

.team-role {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
}

.card-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 150ms, border-color 150ms;
  letter-spacing: 0.01em;
}

.card-link-btn.primary {
  background: var(--teal-dark);
  color: #FFFFFF;
  border: 1px solid transparent;
}

.card-link-btn.primary:hover { background: var(--teal); }

.card-link-btn.secondary {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--border-strong);
}

.card-link-btn.secondary:hover { background: rgba(61, 138, 122, 0.08); }

.card-link-btn.storyboard {
  background: var(--orange);
  color: #FFFFFF;
  border: 1px solid transparent;
}

.card-link-btn.storyboard:hover { background: var(--orange-dark); }

/* =========================================================
   GLOBE TOOLTIP (dark — rendered inside canvas overlay)
   ========================================================= */
.globe-tooltip {
  display: block;
  background: rgba(13, 61, 55, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-family: system-ui, sans-serif;
  max-width: 200px;
}

.globe-tooltip strong {
  display: block;
  font-size: 0.78rem;
  color: #FFFFFF;
  line-height: 1.4;
  font-weight: 500;
}

.globe-tooltip span {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.15rem;
}

/* =========================================================
   ABOUT MODALS
   ========================================================= */
dialog {
  margin: auto; /* restore centring removed by the universal reset */
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: 520px;
  width: calc(100% - 2.5rem);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(13, 61, 55, 0.35);
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(13, 61, 55, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

dialog[open] {
  animation: modal-in 220ms var(--ease);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--teal-dark);
  padding: 1.25rem 1.75rem;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: normal;
  line-height: 1.35;
  color: #FFFFFF;
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms, color 150ms;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.25); color: #FFFFFF; }

.modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.modal-body p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1rem;
}

.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--teal);
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 0.25rem;
  transition: background 150ms;
}

.modal-link:hover { background: var(--teal-dark); color: #FFFFFF; }

/* =========================================================
   LEGEND (visible only when map tab is active)
   ========================================================= */
.map-legend {
  position: fixed;
  bottom: 2rem;
  right: 1.25rem;
  z-index: 20;
  background: rgba(13, 61, 55, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
}

body.tab-map-active .map-legend {
  opacity: 1;
  pointer-events: auto;
}

.map-legend.panel-open {
  transform: translateX(calc(-1 * var(--panel-w) - 1rem));
}

@media (max-width: 768px) {
  .map-legend { display: none; }
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.cambridge { background: var(--teal); }
.legend-dot.lshtm     { background: var(--olive); }

/* =========================================================
   SITE FOOTER — PARTNER LOGOS
   ========================================================= */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.footer-label {
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem 3.5rem;
}

.footer-logo {
  height: 110px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 150ms;
}

.footer-logo:hover { opacity: 1; }

/* =========================================================
   FOCUS STYLES
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

button:focus-visible { outline: 2px solid var(--teal); }

/* =========================================================
   EVENT TAB PANEL
   ========================================================= */
#tab-event {
  background: var(--teal-dark);
  color: #FFFFFF;
}

.event-panel-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 3.5rem;
}

.event-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.event-section-heading {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 1.5rem;
}

.event-section-sub {
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.75);
  margin: -1rem 0 1.5rem;
}

/* --- Agenda --- */
.agenda-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.agenda-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.25rem;
  align-items: baseline;
}

.agenda-time {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--peach);
  white-space: nowrap;
}

.agenda-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.agenda-detail {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

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

.speaker-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.speaker-avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #FFFFFF;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.speaker-photo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.speaker-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 0.2rem;
}

.speaker-title,
.speaker-affiliation,
.speaker-talk {
  font-family: system-ui, sans-serif;
  margin: 0;
  line-height: 1.4;
}

.speaker-title {
  font-size: 0.78rem;
  color: var(--peach);
  font-weight: 600;
}

.speaker-affiliation {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.1rem;
}

.speaker-talk {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  margin-top: 0.5rem;
}

/* =========================================================
   STORYBOARDS TAB PANEL
   ========================================================= */
.storyboards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  padding: 2rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.storyboards-disclaimer {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.storyboard-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(13, 61, 55, 0.06);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.storyboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(61, 138, 122, 0.18);
}

.storyboard-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--teal-dark);
}

.storyboard-card-body {
  padding: 1.1rem 1.25rem 1.4rem;
}

.storyboard-card-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.storyboard-card-author {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* --- In-page storyboard viewer --- */
#storyboard-viewer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}

.storyboard-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.storyboard-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--teal);
  color: #FFFFFF;
  border: none;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 150ms;
}

.storyboard-back-btn:hover { background: var(--teal-dark); }

.storyboard-open-link {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.storyboard-open-link:hover { text-decoration: underline; }

.storyboard-frame {
  width: 100%;
  height: calc(100vh - var(--header-h) - var(--tabnav-h) - 100px);
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #FFFFFF;
}

/* =========================================================
   SURVEY TAB
   ========================================================= */
.survey-wrap {
  padding: 1.25rem 1.5rem 2rem;
}

.survey-frame {
  width: 100%;
  height: calc(100vh - var(--header-h) - var(--tabnav-h) - 80px);
  min-height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #FFFFFF;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .event-hero { padding: 2.5rem 1.25rem 2rem; }
  .event-panel-inner { padding: 2.25rem 1.25rem 2.5rem; }
  .event-title { font-size: 1.4rem; }
  .br-desktop { display: none; }
  .event-meta-grid { flex-direction: column; gap: 0.75rem; }
  .btn-register { width: 100%; justify-content: center; }
  .agenda-item { grid-template-columns: 1fr; gap: 0.35rem; }
  .speakers-grid { grid-template-columns: 1fr; }

  /* Header — keep logo + nav within the viewport */
  .site-header { padding: 0 0.875rem; }
  .header-inner { gap: 0.5rem; }
  .header-logo { height: 36px; max-height: 36px; max-width: 150px; }
  .header-nav { gap: 0.4rem; }
  .header-nav a {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
    line-height: 1.2;
  }

  /* Tabs — wrap into two fully-visible rows (3 + 2) so every tab is
     reachable without horizontal scrolling. --tabnav-h is bumped to match
     the taller bar so the globe / storyboard-frame height calcs stay correct. */
  :root { --tabnav-h: 88px; }
  .tab-nav {
    height: auto;
    min-height: var(--tabnav-h);
    padding: 0;
    flex-wrap: wrap;
  }
  .tab-btn {
    flex: 1 0 30%;
    justify-content: center;
    white-space: nowrap;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  .tab-btn.is-active {
    border-bottom-width: 2px;
    border-bottom-color: var(--teal);
  }

  /* Mobile-only tab order: swap Projects and Survey */
  .tab-btn[data-tab="event"]       { order: 1; }
  .tab-btn[data-tab="map"]         { order: 2; }
  .tab-btn[data-tab="survey"]      { order: 3; }
  .tab-btn[data-tab="storyboards"] { order: 4; }
  .tab-btn[data-tab="projects"]    { order: 5; }

  .projects-grid { grid-template-columns: 1fr; padding: 1.25rem 1rem; gap: 1rem; }
  .storyboards-grid { grid-template-columns: 1fr; padding: 1.25rem 1rem; gap: 1rem; }
  .survey-wrap { padding: 1.25rem 1rem 2rem; }
  .footer-logos { gap: 1.5rem 2rem; }
  .footer-logo { height: 72px; }
}
