:root {
  --navy: #03253a;
  --ocean: #0b5c8c;
  --sky: #5fb0e0;
  --mist: #eef5fa;
  --ink: #16242f;
  --muted: #4f6170;
  --line: #d6e4ee;
  --orange: #f26b21;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ocean); }
a:hover { color: var(--navy); }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Header */
.hero {
  position: relative;
  display: flex;
  min-height: min(92vh, 860px);
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  border-bottom: 6px solid var(--orange);
}
.slides, .shade { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slide-fade 24s ease-in-out infinite;
}
.slide:nth-child(1), .credit:nth-child(1) { animation-delay: -2.4s; }
.slide:nth-child(2), .credit:nth-child(2) { animation-delay: 5.6s; }
.slide:nth-child(3), .credit:nth-child(3) { animation-delay: 13.6s; }
@keyframes slide-fade {
  0% { opacity: 0; transform: scale(1); }
  10% { opacity: 1; }
  33.3% { opacity: 1; }
  43.3% { opacity: 0; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.06); }
}
@keyframes credit-fade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  33.3% { opacity: 1; }
  43.3% { opacity: 0; }
  100% { opacity: 0; }
}
.shade {
  background:
    linear-gradient(0deg, rgba(3, 37, 58, 0.85) 0%, rgba(3, 37, 58, 0) 45%),
    linear-gradient(90deg, rgba(3, 37, 58, 0.92) 0%, rgba(3, 37, 58, 0.72) 40%, rgba(3, 37, 58, 0.18) 75%, rgba(3, 37, 58, 0.1) 100%),
    linear-gradient(180deg, rgba(3, 37, 58, 0.55) 0%, rgba(3, 37, 58, 0) 18%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  padding-bottom: 36px;
}
.hero-text { margin-top: auto; }
.hero-text > :not(h1) { max-width: 780px; }
.hero h1, .hero .subtitle, .hero .details { text-shadow: 0 1px 12px rgba(3, 37, 58, 0.55); }
.credits {
  position: relative;
  height: 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}
.credit {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
  animation: credit-fade 24s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .slide, .credit { animation: none; }
  .slide:first-child, .credit:first-child { opacity: 1; }
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.topnav a { color: #cfe3f1; text-decoration: none; }
.topnav a:hover { color: var(--white); text-decoration: underline; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(18px, calc((100vw - 72px) / 14), 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
h1 .x { color: var(--sky); font-weight: normal; }

.subtitle {
  margin: 14px 0 32px;
  max-width: 760px;
  color: #d9e8f2;
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.35;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 36px;
}
.facts div {
  padding: 14px 16px;
  border-left: 3px solid var(--sky);
  background: rgba(255, 255, 255, 0.06);
}
.facts dt {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
}
.facts dd { margin: 4px 0 0; font-size: 17px; line-height: 1.4; }

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.logos img { height: 46px; width: auto; }
.logos .logo-uvi { height: 26px; }
.logos .logo-vicar { height: 78px; }

/* Sections */
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.tint { background: var(--mist); }

h2 {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 1.2;
  color: var(--navy);
}
h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 12px;
  background: var(--orange);
}

.lead { font-size: 19px; max-width: 780px; }
.about p { max-width: 780px; }

/* Schedule as a timeline */
.schedule { margin: 0; padding: 0; list-style: none; max-width: 780px; }
.schedule > li {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  column-gap: 48px;
  padding: 0 0 16px;
}
.schedule > li::before {
  content: "";
  position: absolute;
  left: 93px;
  top: 6px;
  z-index: 1;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid var(--ocean);
  border-radius: 50%;
  background: var(--white);
}
.schedule > li::after {
  content: "";
  position: absolute;
  left: 99px;
  top: 13px;
  bottom: -13px;
  width: 2px;
  background: var(--ocean);
}
.schedule > li:last-child { padding-bottom: 0; }
.schedule > li:last-child::after { display: none; }
.schedule .when { color: var(--ocean); font-size: 15px; font-weight: bold; line-height: 26px; text-align: right; }
.schedule .what { color: var(--navy); font-size: 18px; font-weight: bold; line-height: 26px; }
.schedule .talks { margin: 4px 0 0; padding: 0; list-style: none; }
.schedule .talks li { display: grid; grid-template-columns: 50px 1fr; padding: 3px 0 3px 22px; font-size: 16px; line-height: 22px; }
.schedule .talks .t { color: var(--ocean); font-size: 14px; font-weight: bold; }
.schedule .talks a { color: var(--navy); text-decoration: none; border-bottom: 1px solid transparent; }
.schedule .talks a:hover { color: var(--ocean); border-bottom-color: var(--ocean); }
.note { margin-top: 20px; color: var(--muted); font-size: 15px; }

/* Speakers */
.speakers { display: grid; gap: 22px; }

.speaker {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--ocean);
}
.speaker img,
.speaker .monogram {
  width: 150px;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
}
.speaker .monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  font-size: 40px;
  letter-spacing: 0.04em;
}
.speaker h3 { margin: 0; font-size: 23px; color: var(--navy); line-height: 1.25; }
.role {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.affil { margin: 2px 0 0; color: var(--muted); }
.talk {
  margin: 14px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--orange);
  color: var(--ocean);
  font-size: 19px;
  font-weight: bold;
  line-height: 1.35;
}
.bio { margin: 14px 0 0; font-size: 16px; }

.speaker--pending { grid-template-columns: 96px 1fr; align-items: center; padding: 20px 26px; border-top-color: var(--sky); }
.speaker--pending .monogram { width: 96px; height: 96px; font-size: 28px; border-radius: 50%; }

/* Organizers */
.organizers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.organizers li { padding: 16px; border-left: 3px solid var(--ocean); background: var(--mist); }
.organizers strong { display: block; color: var(--navy); }
.organizers span { color: var(--muted); font-size: 15px; line-height: 1.4; display: block; }

/* Footer */
footer {
  background: var(--navy);
  color: #d9e8f2;
  padding: 44px 0 36px;
  border-top: 6px solid var(--orange);
  font-size: 15px;
}
footer a { color: var(--white); }
footer p { margin: 0 0 22px; max-width: 780px; }
footer .logos img { height: 40px; }
footer .logos .logo-uvi { height: 22px; }
footer .logos .logo-vicar { height: 66px; }

/* Phones and small tablets */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topnav { margin-bottom: 32px; }
  .facts { grid-template-columns: 1fr; gap: 10px; }
  .logos { gap: 18px 26px; }
  .logos img { height: 36px; }
  .logos .logo-uvi { height: 20px; }
  .logos .logo-vicar { height: 62px; }
  section { padding: 48px 0; }
  .speaker { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .speaker img, .speaker .monogram { width: 135px; height: 180px; }
  .speaker--pending { grid-template-columns: 72px 1fr; gap: 16px; }
  .speaker--pending .monogram { width: 72px; height: 72px; font-size: 22px; border-radius: 50%; }
  .organizers { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .organizers { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Labs and programs */
.labs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.labs a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.labs a:hover { border-color: var(--ocean); box-shadow: 0 2px 10px rgba(3, 37, 58, 0.08); }
.labs strong { color: var(--ocean); line-height: 1.3; }
.labs span { color: var(--muted); font-size: 15px; line-height: 1.4; }
.labs .lab-mark,
.labs .lab-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  margin-bottom: 10px;
  object-fit: contain;
}
.labs .lab-mark {
  border: 2px dashed var(--line);
  color: var(--navy);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.04em;
}
@media (max-width: 760px) {
  .labs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .labs { grid-template-columns: 1fr; }
}

/* Date, time, and place */
.details { margin: 0 0 36px; font-size: 19px; line-height: 1.55; color: var(--white); }
.details span { display: block; }
.details span + span { color: #cfe3f1; }
@media (max-width: 760px) { .details { font-size: 17px; } }

/* Talk label */
.talk-label {
  margin: 14px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.talk-label + .talk { margin-top: 0; }


@media (max-width: 760px) {
  .hero { min-height: 0; }
  .hero-inner { padding-top: 16px; padding-bottom: 28px; }
  .hero-text { margin-top: 150px; }
  .shade {
    background:
      linear-gradient(0deg, rgba(3, 37, 58, 0.95) 0%, rgba(3, 37, 58, 0.82) 55%, rgba(3, 37, 58, 0.3) 85%, rgba(3, 37, 58, 0.5) 100%);
  }
  .credits { height: 32px; }
  .credit { white-space: normal; }
}

/* Speakers menu in the top bar */
.has-menu { position: relative; }
.has-menu summary { color: #cfe3f1; cursor: pointer; list-style: none; }
.has-menu summary::-webkit-details-marker { display: none; }
.has-menu summary::after,
.bio-more summary::after {
  content: "";
  display: inline-block;
  margin-left: 7px;
  vertical-align: 2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s;
}
.has-menu details[open] summary::after,
.bio-more[open] summary::after { transform: rotate(180deg); }
.has-menu summary:hover { color: var(--white); text-decoration: underline; }
.menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -16px;
  z-index: 30;
  width: 270px;
  padding: 10px 0;
  background: var(--white);
  border-top: 3px solid var(--orange);
  box-shadow: 0 12px 32px rgba(3, 37, 58, 0.35);
  letter-spacing: 0;
}
.menu ul { margin: 0; padding: 0; list-style: none; }
.menu a { display: block; padding: 6px 18px; color: var(--navy); font-size: 15px; text-decoration: none; }
.menu a:hover { background: var(--mist); color: var(--navy); text-decoration: none; }
.menu .menu-all { color: var(--ocean); font-weight: bold; }
.menu-label { margin: 10px 18px 2px; color: var(--muted); font-size: 13px; font-weight: bold; }

/* About */
.about-lead { max-width: 840px; margin: 0 0 18px; color: var(--navy); font-size: clamp(22px, 2.7vw, 29px); font-weight: bold; line-height: 1.32; }
.about-body { max-width: 780px; margin: 0 0 18px; font-size: 19px; }
.pill { display: inline-block; margin: 0; padding: 8px 16px; border-left: 4px solid var(--orange); background: var(--mist); color: var(--navy); font-size: 16px; font-weight: bold; }

/* Speakers and organizers */
.group { margin: 0 0 16px; color: var(--ocean); font-size: 21px; }
.speakers + .group { margin-top: 48px; }
.speaker { scroll-margin-top: 16px; }
.lab { margin: 4px 0 0; font-size: 15px; }
.lab a { color: var(--ocean); text-decoration: none; border-bottom: 1px solid #a9c8dc; }
.lab a:hover { border-bottom-color: var(--ocean); }
.bio-more { margin-top: 14px; }
.bio-more summary {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ocean);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
}
.bio-more summary::-webkit-details-marker { display: none; }
.bio-more summary:hover { border-color: var(--ocean); background: var(--mist); }
.bio-more .hide-label,
.bio-more[open] .show-label { display: none; }
.bio-more[open] .hide-label { display: inline; }
.bio-more .bio { margin-top: 12px; }

/* CMES seal */
.logos .logo-cmes { height: 72px; }
footer .logos .logo-cmes { height: 62px; }

@media (max-width: 760px) {
  .slide:nth-child(1) { object-position: 66% 50%; }
  .slide:nth-child(2) { object-position: 58% 50%; }
  .slide:nth-child(3) { object-position: 72% 50%; }
  .logos .logo-cmes { height: 56px; }
  .about-body { font-size: 17px; }
}

/* Button for the stay-in-touch form link */
.button { display: inline-block; padding: 12px 24px; border-radius: 999px; background: var(--orange); color: var(--white); font-weight: bold; text-decoration: none; }
.button:hover { background: var(--navy); color: var(--white); }

@media (max-width: 760px) {
  .schedule > li { grid-template-columns: 64px 1fr; column-gap: 36px; }
  .schedule > li::before { left: 75px; }
  .schedule > li::after { left: 81px; }
  .schedule .what { font-size: 17px; }
  .schedule .talks li { grid-template-columns: 46px 1fr; padding-left: 0; }
}

/* Note above the schedule */
.sched-note { margin: -6px 0 22px; color: var(--muted); font-size: 15px; font-style: italic; }

/* Reef Solutions logo */
.hero-text > .logos { max-width: none; }
.logos .logo-reef-solutions { height: 60px; }
footer .logos .logo-reef-solutions { height: 52px; }
@media (max-width: 760px) {
  .logos .logo-reef-solutions { height: 48px; }
}
