/* Kavli-IAU Symposium (IAUS 387) — self-contained micro-site styles.
   Not linked to the main site stylesheet: this is an archived conference site
   with its own fixed identity and no theme switching. */

/* ---------- tokens ---------- */
:root {
  --ink:        #1b1633;
  --ink-soft:   #3d3752;
  --body:       #26232f;
  --muted:      #5d5870;
  --purple:     #68246d;
  --purple-dk:  #4b1a4f;
  --amber:      #b06a00;
  --amber-br:   #f0b429;
  --paper:      #ffffff;
  --wash:       #f5f3f8;
  --line:       #ddd8e4;
  --focus:      #f0b429;

  --measure:    68ch;
  --wrap:       1180px;
  --radius:     6px;
  --font-body:  "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head:  "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 2rem 0 0.6rem;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.85rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p, ul, ol { margin: 0 0 1rem; }
p, li { max-width: var(--measure); }

a { color: var(--purple); text-underline-offset: 2px; }
a:hover { color: var(--purple-dk); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

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

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.conf-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 100;
}
.conf-skip:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ---------- header ---------- */
.conf-header {
  background: var(--ink);
  color: #fff;
  border-bottom: 4px solid var(--amber-br);
}
.conf-header-inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
}
.conf-brand { flex: 1 1 20rem; text-decoration: none; color: inherit; display: block; }
.conf-brand-name {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-br);
}
.conf-brand-tag {
  display: block;
  font-size: 0.95rem;
  color: #d9d4e8;
  margin-top: 0.15rem;
}
.conf-brand:hover .conf-brand-name { text-decoration: underline; }

.conf-nav-toggle {
  display: none;
  font: inherit;
  font-size: 0.95rem;
  color: #fff;
  background: transparent;
  border: 1px solid #6f6790;
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}
.conf-nav-toggle:hover { background: #2a2447; }

.conf-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
}
.conf-nav li { max-width: none; }
.conf-nav a {
  display: block;
  color: #ece9f4;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius);
}
.conf-nav a:hover { background: #2f2851; color: #fff; text-decoration: underline; }
.conf-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--amber-br);
}

/* ---------- hero ---------- */
.conf-hero {
  position: relative;
  background: var(--ink) center/cover no-repeat;
  color: #fff;
  padding: clamp(3rem, 8vw, 6.5rem) 0;
}
.conf-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(15,11,32,0.88) 0%, rgba(15,11,32,0.62) 55%, rgba(15,11,32,0.45) 100%);
}
.conf-hero > .wrap { position: relative; }
.conf-hero h1 { color: var(--amber-br); max-width: 22ch; }
.conf-hero .conf-hero-sub {
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.5rem);
  color: #fff;
  max-width: 34ch;
  margin-bottom: 1.4rem;
}
.conf-hero .conf-hero-meta {
  font-size: 1.05rem;
  font-weight: 600;
  color: #efe9d2;
  margin-bottom: 1.6rem;
}
.conf-hero .conf-hero-meta span { display: block; }

/* ---------- page title band (interior pages) ---------- */
.conf-pagehead {
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  padding: 2.2rem 0 1.8rem;
}
.conf-pagehead p { color: var(--muted); margin-bottom: 0; }

/* ---------- buttons ---------- */
.conf-btns { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.4rem 0; }
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  background: var(--amber-br);
  color: var(--ink);
  border: 2px solid var(--amber-br);
}
.btn:hover { background: #ffc94d; border-color: #ffc94d; color: var(--ink); }
.btn-ghost { background: transparent; color: #fff; border-color: #b9b1d4; }
.btn-ghost:hover { background: rgba(255,255,255,0.14); color: #fff; border-color: #fff; }

/* ---------- layout ---------- */
main { padding-bottom: 3.5rem; }
.conf-section { padding: 2.6rem 0 0.6rem; }
.conf-section:first-of-type { padding-top: 2.2rem; }

.conf-lede { font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- figures ---------- */
figure { margin: 1.8rem 0; }
figure img { display: block; border-radius: var(--radius); width: 100%; }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; max-width: var(--measure); }

.conf-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 1.8rem 0;
}
.conf-gallery figure { margin: 0; }

/* ---------- speakers ---------- */
.conf-speakers { display: grid; gap: 2rem; }
.conf-speaker {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.conf-speaker:last-child { border-bottom: 0; }
.conf-speaker img { border-radius: var(--radius); width: 100%; }
.conf-speaker h2 { margin-top: 0; font-size: 1.25rem; }
.conf-speaker .affil { color: var(--muted); margin-top: -0.35rem; }

/* ---------- abstracts ---------- */
.conf-index {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 1.5rem 0 2.5rem;
}
.conf-index h2 { margin-top: 0; font-size: 1.1rem; }
.conf-index ul {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.conf-index li { break-inside: avoid; margin-bottom: 0.35rem; max-width: none; }

.conf-talk {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.conf-talk:last-child { border-bottom: 0; }
.conf-talk h2 { margin-top: 0; font-size: 1.2rem; }
.conf-talk .affil { color: var(--muted); font-size: 0.95rem; margin: -0.3rem 0 0.8rem; }
.backlink { font-size: 0.85rem; }

/* ---------- programme ---------- */
.table-scroll { overflow-x: auto; margin: 1.2rem 0 2.4rem; }
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 46rem;
  font-size: 0.95rem;
}
caption {
  text-align: left;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 0.6rem;
}
th, td { text-align: left; padding: 0.6rem 0.8rem; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--ink); color: #fff; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
tbody th[scope="row"] { font-weight: 600; white-space: nowrap; color: var(--ink); }
.session th {
  background: var(--wash);
  color: var(--purple-dk);
  font-family: var(--font-head);
  font-size: 1rem;
}
.break td { color: var(--muted); font-style: italic; background: #fbfafd; }
td > span { display: block; margin-bottom: 0.45rem; }
td > span:last-child { margin-bottom: 0; }
td .who { display: block; color: var(--muted); font-size: 0.9rem; }
td .role { font-weight: 600; color: var(--ink); margin-top: 0.7rem; }
td > span.role:first-child { margin-top: 0; }

/* ---------- committee ---------- */
.conf-people { list-style: none; padding: 0; display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.conf-people li { max-width: none; }
.conf-people .name { display: block; font-weight: 600; color: var(--purple); }
.conf-people .where { display: block; color: var(--muted); font-size: 0.93rem; }

/* ---------- partner logos ---------- */
.conf-partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}
.conf-partners img { max-height: 62px; width: auto; }

/* ---------- footer ---------- */
.conf-footer {
  background: var(--ink);
  color: #ded9ec;
  padding: 2.6rem 0 2rem;
  font-size: 0.95rem;
}
.conf-footer h2 { color: #fff; font-size: 1.15rem; margin-top: 0; }
.conf-footer a { color: var(--amber-br); }
.conf-footer a:hover { color: #ffd576; }
.conf-footer p { margin-bottom: 0.4rem; }
.conf-footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.conf-footer-note {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #35304f;
  color: #a9a2c4;
  font-size: 0.87rem;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .conf-nav-toggle { display: block; }
  .conf-nav { flex-basis: 100%; display: none; }
  .conf-nav.is-open { display: block; }
  .conf-nav ul { flex-direction: column; gap: 0; }
  .conf-nav a { padding: 0.7rem 0.6rem; border-bottom: 1px solid #302a4e; border-radius: 0; }
  .conf-speaker { grid-template-columns: 1fr; }
  .conf-speaker img { max-width: 230px; }
  .conf-index ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .conf-nav, .conf-nav-toggle, .conf-skip, .conf-btns { display: none; }
  .conf-header, .conf-footer { background: #fff; color: #000; }
  .conf-hero::before { display: none; }
  table { min-width: 0; font-size: 0.8rem; }
}
