/* =========================================================
   XRAG '26 — theme layer on top of Bootstrap 5
   Layout = Bootstrap utilities + grid. This file only adds
   colors, spacing tweaks, and component-specific cosmetics.
   ========================================================= */

:root {
  --cream:        #fbedd3;
  --cream-deep:   #f7e3be;
  --paper:        #fff6e5;
  --ink:          #3d2718;
  --ink-soft:     #6b4a2e;
  --muted:        #8a6f55;
  --line:         rgba(61, 39, 24, 0.14);

  --blue:         #4a95cc;
  --blue-deep:    #2f6b9b;
  --red:          #e55b4a;
  --red-deep:     #c63a2b;
  --yellow:       #f4c447;
  --orange:       #e89146;

  --shadow:       0 24px 60px rgba(61, 39, 24, 0.14);
  --shadow-soft:  0 12px 30px rgba(61, 39, 24, 0.08);
  --radius:       22px;
  --radius-sm:    14px;

  /* Bootstrap overrides */
  --bs-body-bg:          var(--cream);
  --bs-body-color:       var(--ink);
  --bs-body-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-link-color:       var(--blue-deep);
  --bs-link-hover-color: var(--red-deep);
  --bs-border-color:     var(--line);
  --bs-border-radius:    var(--radius-sm);
  --bs-border-radius-lg: var(--radius);
}

body {
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.01em; }
.fw-black { font-weight: 900; }
.text-muted-ink { color: var(--ink-soft) !important; }
.text-accent    { color: var(--red-deep); }

/* === NAVBAR =========================================== */
.site-header {
  background: rgba(251, 237, 211, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 3px;
}

@media (max-width: 575.98px) {
  .brand-icon { width: 46px; height: 46px; border-radius: 12px; }
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.4px;
}

.brand-text { color: var(--ink-soft); font-weight: 700; font-size: 14px; }

.navbar-nav .nav-link {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14.5px;
  padding: 8px 12px !important;
  border-bottom: 2px solid transparent;
  border-radius: 6px;
  transition: color 150ms, border-color 150ms, background 150ms;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--red-deep);
  border-bottom-color: var(--yellow);
}

.navbar-toggler {
  border-color: var(--line);
  padding: 6px 10px;
}
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(74,149,204,.25); }

/* === HERO ============================================= */
.hero {
  position: relative;
  padding: clamp(80px, 11vw, 160px) 0 clamp(80px, 11vw, 160px);
  background: var(--cream);
  overflow: hidden;
  isolation: isolate;
  min-height: min(96vh, 880px);
  display: flex;
  align-items: center;
}

/* Banner image as full-opacity backdrop. The image already has an
   empty central area, so the hero text sits inside it without
   needing any fade / overlay. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-banner-url, url("assets/banner.png"));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-icon {
  display: block;
  width: clamp(96px, 11vw, 140px);
  height: auto;
  margin: 0 auto clamp(14px, 2vw, 22px);
  border-radius: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 6px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 575.98px) {
  .hero-icon { width: 84px; border-radius: 18px; padding: 5px; }
}

/* On tablet/mobile, take the banner out of the absolute backdrop
   and let it sit as a separate block at the top so it cannot overlap
   the text below it. */
@media (max-width: 991.98px) {
  .hero {
    display: block;
    padding: 0 0 clamp(36px, 7vw, 70px);
    min-height: auto;
    overflow: visible;
  }
  .hero-bg {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: contain;
    background-position: center;
    margin-bottom: clamp(18px, 4vw, 36px);
  }
  .hero .container-xxl {
    padding-left: clamp(14px, 4vw, 24px);
    padding-right: clamp(14px, 4vw, 24px);
  }
  /* Slightly tighter hero typography on mobile so it doesn't push to
     the edges of small screens */
  .hero h1 { font-size: clamp(40px, 12vw, 64px); }
  .hero .subtitle { font-size: clamp(18px, 4.5vw, 24px); }
  .hero .blurb { font-size: clamp(15px, 3.8vw, 18px); }
}

/* Even narrower phones — make the banner a bit more compact */
@media (max-width: 480px) {
  .hero-bg { aspect-ratio: 4 / 3; }
}

.eyebrow,
.section-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(74, 149, 204, 0.14);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.hero h1 {
  line-height: 1.02;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -0.02em;
}

.hero .subtitle  { color: var(--red-deep); }
.hero .blurb     { color: var(--ink-soft); max-width: 780px; margin-left: auto; margin-right: auto; }

.snapshot span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.snapshot span b { color: var(--blue-deep); margin-right: 6px; font-weight: 800; }

/* Buttons (extend Bootstrap) */
.btn-xrag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 160ms, box-shadow 160ms, background 160ms, color 160ms;
}
.btn-xrag:hover { transform: translateY(-2px); }

.btn-xrag.primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 14px 30px rgba(229, 91, 74, 0.32);
}
.btn-xrag.primary:hover { background: var(--red-deep); color: #fff; }

.btn-xrag.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-xrag.ghost:hover { background: var(--ink); color: var(--cream); }

.btn-xrag.dark { background: var(--ink); color: var(--cream); }

/* === SECTION BLOCKS =================================== */
section.block {
  padding: clamp(56px, 7vw, 100px) 0;
}
section.block.alt   { background: var(--cream-deep); }
section.block.paper { background: var(--paper); }
section.block.ink   { background: var(--ink); color: var(--cream); }
section.block.ink h1, section.block.ink h2, section.block.ink h3 { color: var(--cream); }
section.block.ink p { color: rgba(255, 246, 229, 0.78); }
section.block.ink .section-kicker { background: rgba(244, 196, 71, 0.18); color: var(--yellow); }
section.block.ink .text-muted-ink { color: rgba(255, 246, 229, 0.7) !important; }

.section-head { max-width: 900px; }
.section-head h2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.08; }

/* === ABOUT / Pillars ================================== */
.about-copy p { color: var(--ink-soft); font-size: 17px; }

.areas-header {
  max-width: 760px;
  padding-top: 30px;
  border-top: 1px dashed var(--line);
}
.areas-kicker {
  background: rgba(229, 91, 74, 0.16);
  color: var(--red-deep);
}
.areas-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.areas-intro {
  margin: 0;
  font-size: 16px;
}

.pillar {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  height: 100%;
}
.pillar::before {
  content: "Research area";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(74, 149, 204, 0.14);
  color: var(--blue-deep);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.pillar .num {
  display: inline-block;
  margin-bottom: 12px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.6px;
  color: var(--red);
}
.pillar h3 { font-size: 19px; margin: 0 0 10px; line-height: 1.25; }
.pillar p  { color: var(--ink-soft); margin: 0; font-size: 15px; line-height: 1.55; }

/* Per-card accent colors via :nth-child on the column wrapper */
[data-slot="pillars"] > div:nth-child(1) .pillar .num { color: var(--blue-deep); }
[data-slot="pillars"] > div:nth-child(2) .pillar .num { color: var(--red); }
[data-slot="pillars"] > div:nth-child(3) .pillar .num { color: var(--orange); }
[data-slot="pillars"] > div:nth-child(4) .pillar .num { color: var(--blue); }
[data-slot="pillars"] > div:nth-child(5) .pillar .num { color: var(--red-deep); }

/* === TOPIC CLOUD ====================================== */
.topic-cloud span {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 14.5px;
}
.topic-cloud span:nth-child(4n+1) { border-color: rgba(74, 149, 204, 0.5); }
.topic-cloud span:nth-child(4n+2) { border-color: rgba(229, 91, 74, 0.5);  }
.topic-cloud span:nth-child(4n+3) { border-color: rgba(244, 196, 71, 0.7); }
.topic-cloud span:nth-child(4n+4) { border-color: rgba(232, 145, 70, 0.6); }

/* === CFP (simple bullets) ============================= */
.cfp-simple { color: var(--ink); }
.cfp-simple .cfp-h {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cfp-simple > p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0 0 12px;
}
.cfp-bullets {
  list-style: none;
  padding: 0;
  margin: 6px 0 14px;
}
.cfp-bullets li {
  position: relative;
  padding: 6px 0 6px 26px;
  color: var(--ink-soft);
  font-size: 16px;
}
.cfp-bullets li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--ink);
}
.cfp-bullets li b { color: var(--ink); font-weight: 800; }

/* === TIMELINE ========================================= */
.dates-note {
  max-width: 720px;
  margin: 0 auto 28px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(244, 196, 71, 0.22);
  color: var(--ink);
  font-size: 14.5px;
  text-align: center;
}

.timeline article {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  box-shadow: var(--shadow-soft);
}
.timeline article:nth-child(odd) { border-left-color: var(--blue); }
.timeline time { font-weight: 900; color: var(--red-deep); }
.timeline h3   { margin: 0 0 4px; font-size: 18px; }
.timeline p    { margin: 0; color: var(--ink-soft); font-size: 15px; }

@media (max-width: 575.98px) {
  .timeline article { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
}

/* === SUBMISSION ======================================= */
.card-soft {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.card-soft h3 { font-size: 19px; margin: 0 0 8px; }
.card-soft p, .card-soft li { color: var(--ink-soft); }
.card-soft li + li { margin-top: 6px; }
.card-soft a { color: var(--blue-deep); font-weight: 700; }

.submission-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream) !important;
  text-decoration: none;
  font-weight: 800;
}
.submission-cta:hover { background: var(--red-deep); }

/* === PROGRAM ========================================== */
.program-list article {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
}
.program-list time { font-weight: 900; color: var(--blue-deep); }
.program-list h3   { margin: 0; font-size: 16.5px; }
.program-list p    { margin: 4px 0 0; color: var(--ink-soft); font-size: 14.5px; }

@media (max-width: 575.98px) {
  .program-list article { grid-template-columns: 70px 1fr; padding: 14px 16px; }
}

/* === PEOPLE =========================================== */
.person {
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  height: 100%;
  transition: transform 200ms, box-shadow 200ms;
}
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.person img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  background: var(--cream-deep);
  display: block;
}
.person .body { padding: 12px 14px 16px; }
.person-role {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 149, 204, 0.14);
  color: var(--blue-deep);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.person h3    { margin: 0 0 2px; font-size: 15.5px; line-height: 1.25; }
.person .aff  { margin: 0 0 6px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.35; }
.person a     { color: var(--blue-deep); font-weight: 700; font-size: 12px; word-break: break-all; }

/* === COMMITTEE ======================================== */
.committee-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 15px;
}
.committee-list li b { color: var(--ink); }

/* === SPONSORS / Institutions grid =====================
   Flex layout so the last (incomplete) row is naturally
   centered. 5-up on desktop → 4-up on laptop → 3-up on
   tablet → 2-up on phone. */
.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}

.sponsor-tile {
  /* 5 columns by default (desktop ≥1200px) */
  flex: 0 0 calc((100% - 16px * 4) / 5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 150px;
  padding: 18px 14px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
a.sponsor-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(74, 149, 204, 0.45);
}

.sponsor-tile img {
  max-height: 70px;
  max-width: 85%;
  width: auto;
  object-fit: contain;
}

.sponsor-name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-soft);
}
.sponsor-name-only { font-size: 14px; color: var(--ink); }

/* 4-up on laptop */
@media (max-width: 1199.98px) {
  .sponsor-tile { flex: 0 0 calc((100% - 16px * 3) / 4); }
}
/* 3-up on tablet */
@media (max-width: 900px) {
  .sponsor-tile { flex: 0 0 calc((100% - 16px * 2) / 3); }
}
/* 2-up on phone */
@media (max-width: 575.98px) {
  .sponsor-grid { padding: 14px; gap: 10px; }
  .sponsor-tile {
    flex: 0 0 calc((100% - 10px) / 2);
    min-height: 120px;
    padding: 14px 10px;
  }
  .sponsor-tile img { max-height: 56px; }
}

/* === CONTACT ========================================== */
.contact-card {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.contact-email {
  display: inline-block;
  margin-top: 4px;
  font-size: 19px;
  font-weight: 800;
  color: var(--red-deep) !important;
  text-decoration: none;
  word-break: break-all;
}
.contact-email:hover { text-decoration: underline; }

/* === FOOTER =========================================== */
.footer {
  padding: 24px 0;
  background: var(--ink);
  color: rgba(255, 246, 229, 0.75);
  font-size: 14px;
}
.footer a { color: var(--yellow) !important; font-weight: 800; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* === Mobile polish ==================================== */
@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid var(--line);
  }
  .navbar-nav .nav-link { padding: 10px 4px !important; border-radius: 0; }
}

@media (max-width: 575.98px) {
  .hero h1 { font-size: clamp(34px, 11vw, 52px); }
  .btn-xrag { width: 100%; }
}
