:root {
  --bg: #F4F4F1;
  --ink: #16181D;
  --ink-2: #2A2D34;
  --ink-3: #3C3F47;
  --muted: #5A5D66;
  --rule: #DCDDD6;
  --rule-soft: #E7E8E2;
  --rule-row: #ECEDE7;
  --chip: #E7E8E2;
  --card: #FFFFFF;
  --accent: #3346D3;
  --orange: #E0772B;
  --teal: #1E8A7A;
  --teal-ink: #1E7A6C;
  --purple: #8A4FD0;
  --rose: #D94C6A;
  --yellow: #E8B931;
  --grey: #8E9099;
  --dark: #16181D;
  --dark-rule: #3A3D46;
  --dark-text: #C6C8CF;
  --dark-muted: #A3A6AE;
  --link: #2B3BB8;
  --link-hover: #16207A;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.mono { font-family: var(--mono); }
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(244, 244, 241, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 16px;
}
.brand:hover { color: var(--ink); }
.brand-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.event-link {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border-radius: 999px; background: var(--ink); color: #FFFFFF;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.event-link:hover { background: var(--accent); color: #FFFFFF; }
.brand-mark { display: flex; align-items: center; gap: 3px; }
.bm { display: block; }
.bm-diamond { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.bm-pill { width: 8px; height: 14px; border-radius: 4px; background: var(--orange); }
.bm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey); }

.nav-links {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px 22px; font-size: 15px; font-weight: 500;
}
.nav-links a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.nav-links a:hover { color: var(--accent); }
.nav-links .nav-cta {
  background: var(--ink); color: #FFFFFF;
  padding: 10px 18px; border-radius: 999px; font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--accent); color: #FFFFFF; }

/* When the links wrap below the brand (narrow screens), they fold away while
   scrolling down and return on scroll up. The header's margin grows by exactly
   what the links lose, so the page below never shifts. */
.site-header.nav-wrapped .nav { row-gap: 0; }
.site-header.nav-wrapped .nav-links {
  height: var(--nav-links-h, auto);
  margin-top: 12px;
  overflow: hidden;
  transition: height 240ms ease, margin-top 240ms ease, opacity 200ms ease, visibility 240ms;
}
.site-header.nav-wrapped { transition: margin-bottom 240ms ease; }
.site-header.nav-wrapped.nav-collapsed { margin-bottom: calc(var(--nav-links-h, 0px) + 12px); }
.site-header.nav-wrapped.nav-collapsed .nav-links {
  height: 0; margin-top: 0; opacity: 0; visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .site-header.nav-wrapped, .site-header.nav-wrapped .nav-links { transition: none; }
}

/* ---------- Hero ---------- */
.hero { --blob-w: min(460px, 36vw); position: relative; padding-top: 88px; padding-bottom: 40px; }
.hero-head { padding-right: calc(var(--blob-w) + 40px); min-height: calc(var(--blob-w) * 0.84 + 24px); }
.hero > *:not(.hero-media) { position: relative; z-index: 1; }

.hero-media {
  position: absolute; z-index: 0;
  top: 64px; right: 24px;
  width: var(--blob-w);
  margin: 0;
}
.hero-blob {
  width: 100%;
  aspect-ratio: 500 / 420;
  background: #D3DCEA url("../img/montreal.jpg") center / cover no-repeat;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  animation: blobMorph 36s ease-in-out infinite;
}
@keyframes blobMorph {
  0%   { border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%; }
  33%  { border-radius: 58% 42% 38% 62% / 55% 62% 38% 45%; }
  66%  { border-radius: 38% 62% 55% 45% / 62% 38% 62% 38%; }
  100% { border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%; }
}
@media (prefers-reduced-motion: reduce) { .hero-blob { animation: none; } }

.photo-credit {
  margin-top: 14px;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #6E717A;
}
.photo-credit a { color: inherit; text-decoration-color: rgba(110, 113, 122, 0.4); text-underline-offset: 2px; }
.photo-credit a:hover { color: var(--ink); }

.hero-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
}
.tag { padding: 6px 12px; border-radius: 999px; }
.tag-solid { background: var(--ink); color: #FFFFFF; text-transform: none; }
.tag-outline { border: 1px solid #B9BBB3; color: var(--ink-3); background: rgba(244, 244, 241, 0.7); }
.tag-date { border: 1px solid #A9B3FF; color: #2535B0; background: #E8EBFF; font-weight: 500; }

.hero-title {
  margin: 36px 0 0;
  font-size: clamp(38px, 5.6vw, 84px);
  line-height: 1; letter-spacing: -0.03em; font-weight: 700;
}
.hero-sub {
  margin: 18px 0 0;
  font-size: clamp(26px, 3.6vw, 52px);
  line-height: 1.1; font-weight: 500; color: var(--ink-2); letter-spacing: -0.02em;
}
.hero-program {
  margin: 12px 0 0;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.teal { color: var(--teal-ink); }

.hero-body { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 32px 72px; }
.hero-text {
  flex: 999 1 560px; min-width: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px 40px; color: var(--ink-3);
}
.hero-text p { margin: 0; }
.hero-text strong { color: var(--ink); font-weight: 600; }
.hero-topics { flex: 1 1 260px; max-width: 340px; }
.chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.chips span { padding: 6px 12px; border-radius: 999px; background: var(--chip); }

.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  text-decoration: none; font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease;
}
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: #2535B0; color: #FFFFFF; }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #FFFFFF; }

/* Hero on narrower screens: the photo moves into the flow so text never sits on top of it */
@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-media {
    position: relative; top: auto; right: auto;
    width: min(440px, 88%);
    margin: 0 0 32px auto;
  }
  .hero-head { padding-right: 0; min-height: 0; }
  .hero-title { margin-top: 24px; font-size: clamp(38px, 8vw, 72px); }
}

/* ---------- Motif ---------- */
.motif-section { padding-top: 24px; }
.motif-frame {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  overflow: hidden;
}
.motif { display: flex; justify-content: space-between; gap: 2px; min-height: 186px; }
.motif-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
.motif-cell { height: 26px; width: 100%; display: flex; align-items: center; justify-content: center; }
.motif-mark {
  transition: transform 380ms cubic-bezier(.34, 1.56, .64, 1), background-color 380ms ease,
              width 380ms ease, height 380ms ease, border-radius 380ms ease;
}
@media (prefers-reduced-motion: reduce) { .motif-mark { transition: none; } }

/* ---------- Sections ---------- */
.section { padding-top: 112px; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 16px 40px;
}
.section-head h2, .cfp h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1; letter-spacing: -0.03em; font-weight: 600;
}
.section-head p { margin: 0; max-width: 460px; color: var(--muted); font-size: 15px; }
#challenges .section-head p { max-width: 500px; }

/* ---------- Challenges ---------- */
.cards {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}
.card {
  background: var(--card); border-radius: 20px; padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.card-top { display: flex; justify-content: space-between; align-items: start; }
.numeral { font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; }
.glyphs { display: flex; gap: 4px; padding-top: 8px; }
.g { display: block; width: 12px; height: 12px; }
.g.dot { border-radius: 50%; }
.g.sq { border-radius: 2px; }
.g.diamond { transform: rotate(45deg); }
.rose { background: var(--rose); }
.grey { background: var(--grey); }
.blue { background: var(--accent); }
.yellow { background: var(--yellow); }
.teal-bg { background: var(--teal); }
.purple { background: var(--purple); }
.card h3 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; }
.card ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 14px;
  color: var(--ink-3); font-size: 15px;
}
.card li { padding-top: 14px; border-top: 1px solid var(--rule-soft); }

/* ---------- Call for papers ---------- */
.cfp {
  background: var(--dark); color: var(--bg);
  border-radius: 28px; padding: clamp(28px, 5vw, 64px);
}
.topics-interest {
  margin-top: 40px; padding: 24px 0;
  border-top: 1px solid var(--dark-rule); border-bottom: 1px solid var(--dark-rule);
}
.topics-interest h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.topics-interest p { margin: 8px 0 0; color: var(--dark-text); font-size: 15px; }
.topics-interest ul {
  margin: 16px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 32px;
}
.topics-interest li {
  position: relative; padding-left: 18px; color: var(--dark-text); font-size: 15px;
}
.topics-interest li::before {
  content: ""; position: absolute; top: 0.65em; left: 0;
  width: 6px; height: 6px; border-radius: 50%; background: #A9B3FF;
}
.tracks {
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.track {
  border: 1px solid var(--dark-rule); border-radius: 18px; padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.track-head { display: flex; flex-direction: column; gap: 4px; }
.track h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.track .mono { font-size: 13px; color: var(--dark-text); }
.track p { margin: 0; color: var(--dark-text); font-size: 15px; }

.submission-info {
  margin-top: 40px; padding: 24px 0;
  border-top: 1px solid var(--dark-rule); border-bottom: 1px solid var(--dark-rule);
}
.dual-submission-policy, .generative-ai-policy { margin-top: 24px; }
.submission-format h3, .dual-submission-policy h3, .generative-ai-policy h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.submission-format p, .dual-submission-policy p, .generative-ai-policy p { margin: 8px 0 0; color: var(--dark-text); font-size: 15px; }
.submission-format a, .dual-submission-policy a, .generative-ai-policy a { color: #C3CAFF; }
.submission-format a:hover, .dual-submission-policy a:hover, .generative-ai-policy a:hover { color: #FFFFFF; }

.cfp-bottom { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: start; }
.dates { flex: 999 1 520px; min-width: 0; }
.dates-title {
  margin: 0 0 8px;
  font-family: var(--mono); font-size: 15px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: #A9B3FF;
}
.dates-title span { color: var(--grey); text-transform: none; letter-spacing: 0; }
.dates dl { margin: 0; display: flex; flex-direction: column; }
.dates dl > div {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding: 16px 0; border-bottom: 1px solid var(--dark-rule);
}
.dates dl > div:last-child { border-bottom: 0; }
.dates dt.strong { font-weight: 600; }
.dates dd { margin: 0; font-family: var(--mono); color: var(--dark-text); }
.dates dd.bright { color: #FFFFFF; }

.submit { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.btn-disabled {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  border: 1px dashed var(--muted); background: var(--ink-2); color: var(--dark-muted);
  font: inherit; font-weight: 600; cursor: not-allowed;
}
.submit-note { margin: 0; font-size: 14px; color: var(--dark-text); text-align: center; }

/* ---------- Schedule ---------- */
.schedule-coming-soon {
  max-width: 960px; margin: 40px auto 0; padding: 48px 24px;
  border: 1px solid var(--rule); border-radius: 20px; background: var(--card);
  text-align: center;
}
.schedule-coming-soon p {
  margin: 0; color: var(--muted); font-family: var(--mono);
  font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase;
}

/* ---------- Organizers ---------- */
.people {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px;
}
.person {
  background: var(--card); border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.avatar {
  display: block; width: 72px; height: 72px; object-fit: cover;
  border-radius: 18px; background: var(--chip);
}
.avatar-hsiang { object-position: center 32%; }
.avatar-kathleen { object-fit: contain; background: #326A9B; }
.avatar-jamelle, .avatar-golnoosh { object-fit: contain; }
.person .name { margin: 0; font-weight: 700; font-size: 18px; }
.person .name a { color: var(--ink); text-decoration: none; }
.person .name a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.person .affil { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 112px; background: var(--dark); color: var(--dark-text); }
.footer-inner {
  padding-top: 56px; padding-bottom: 56px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
}
.footer-title { margin: 0; color: #FFFFFF; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.footer-sub { margin: 6px 0 0; font-size: 15px; max-width: 460px; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: #FFFFFF; }
.footer-contact .eyebrow { color: var(--grey); }
.footer-contact a { color: #FFFFFF; }
