/* ==========================================================================
   DEON 2027 — shared stylesheet
   Palette and layout follow the AIPS 2025 conference site (zlaire.net/aips2025).
   No external fonts or CDNs: the site works offline.
   ========================================================================== */

:root {
  --brand:        #1b3a6b;   /* deep academic navy */
  --brand-dark:   #12294b;
  --brand-pale:   #eaf0f8;
  --gold:         #b08d3f;   /* accent: section rules, list marks */
  --ink:        #17191d;
  --muted:      #5e6771;
  --rule:       #d8dde5;
  --wash:       #f4f6f9;
  --paper:      #ffffff;
  --footer-bg:  #12294b;

  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;

  --container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: var(--brand); }
a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--brand);
  padding: 10px 18px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------- header  */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--brand);
  box-shadow: 0 1px 0 var(--rule);
}

.site-header .container { max-width: 1440px; }

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 86px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  align-self: stretch;
  position: relative;
  padding-right: 22px;
}

/* the pale block continues past the container to the left window edge */
.brand::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: -50vw;
  background: var(--paper);
  z-index: -1;
}

.logo-img { height: 46px; width: auto; display: block; }
.logo-mark { height: 42px; width: 42px; display: block; }
.logo-seal { height: 48px; width: 48px; display: block; }
.logo-word { height: 42px; width: auto; display: block; }

.brand-divider { width: 1px; height: 38px; background: var(--rule); }

.nav-toggle {
  display: none;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
}

/* ------------------------------------------------------------------ nav  */

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-self: stretch;
  align-items: center;
  position: relative;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list > li { position: relative; }

.nav-list > li > a,
.nav-list > li > button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 11px;
  background: none;
  border: 0;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.nav-list > li > a:hover,
.nav-list > li > button:hover { color: #f2ce93; }
.nav-list > li.is-active > a,
.nav-list > li.is-active > button { border-bottom-color: var(--gold); }

.caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.65;
}

.sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 216px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--brand);
  box-shadow: 0 12px 30px rgba(18, 41, 75, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.has-sub:hover > .sub,
.has-sub:focus-within > .sub,
.has-sub.open > .sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub a {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.sub a:hover { background: var(--wash); color: var(--brand); }
.sub a[aria-current="page"] { color: var(--brand); font-weight: 600; }

/* right-hand menus open leftwards so they stay on screen */
.nav-list > li:last-child .sub,
.nav-list > li:nth-last-child(2) .sub { left: auto; right: 0; }

/* ----------------------------------------------------------------- hero  */

/* The hero is locked to the banner's own 12:5 ratio. That keeps every line of
   type over the same part of the photograph at any window width, which is what
   makes per-region colouring possible.
   Measured luminance: sky 0.50-0.76 (dark type), mid band 0.22-0.35 (kept
   empty), ground 0.03-0.22 (light type). */

.hero {
  position: relative;
  height: calc(100vh - 86px);      /* fills the first screen under the header */
  min-height: 520px;
  max-height: 900px;
  background: url("../img/banner.png") center 42% / cover no-repeat;
  padding: 0;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 10vh;      /* lifts the whole type block off the lower edge */
}

.hero-upper,
.hero-lower {
  position: static;
  width: 100%;
  padding: 0 6%;
  text-align: center;
}

.hero-upper { margin-bottom: 6.5vh; }

/* --- upper block: dark type on the bright sky ------------------------ */

.hero .eyebrow {
  margin: 0 0 3.6vh;
  font-size: clamp(12px, 1.95vh, 18px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #12294b;
  text-shadow: 0 1px 12px rgba(255, 250, 240, 0.8);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(20px, 4.4vh, 44px);
  line-height: 1.46;
  letter-spacing: 0.005em;
  color: #12294b;
  text-shadow: 0 1px 16px rgba(255, 250, 240, 0.85), 0 0 34px rgba(255, 250, 240, 0.5);
}

/* --- lower block: light type on the dark ground ---------------------- */

.hero-mark {
  margin: 0 0 5.2vh;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 7.6vh, 78px);
  line-height: 1;
  letter-spacing: 0.06em;
  color: #fff6e9;
  text-shadow: 0 2px 22px rgba(6, 10, 18, 0.85);
}

.hero-theme {
  margin: 0 0 5.8vh;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 2.6vh, 26px);
  color: #f4d9a8;
  text-shadow: 0 2px 18px rgba(6, 10, 18, 0.85);
}

.hero-actions {
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-block;
  padding: 15px 32px;
  font-size: clamp(11px, 1.7vh, 15px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.btn--solid { background: #e3c07a; color: #12294b; box-shadow: 0 2px 14px rgba(6, 10, 18, 0.3); }
.btn--solid:hover { background: #fff6e9; }
.btn--ghost {
  border: 2px solid rgba(255, 246, 233, 0.9);
  color: #fff6e9;
  text-shadow: 0 1px 8px rgba(6, 10, 18, 0.8);
  background: rgba(9, 16, 30, 0.34);
}
.btn--ghost:hover { background: rgba(255, 246, 233, 0.16); }

/* ------------------------------------------------------------- page head */

.page-head {
  background: var(--wash);
  border-bottom: 1px solid var(--rule);
  padding: 24px 0 22px;
  text-align: center;
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  margin: 0;
}

/* -------------------------------------------------------------- sections */

main { display: block; }

.section { padding: 62px 0; }
.section--wash { background: var(--wash); border-block: 1px solid var(--rule); }
.section--tight { padding: 44px 0; }

.section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 10px;
}
.section h2 + .rule {
  width: 54px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 34px;
}

.section h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin: 40px 0 14px;
}

.prose { max-width: 78ch; margin: 0 auto; }
.prose p { margin: 0 0 20px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.lead { font-size: 18px; }

.center { text-align: center; }

/* ------------------------------------------------------------- key dates */

.keydates {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand);
  background: var(--paper);
  padding: 8px 30px;
}
.keydates dl { margin: 0; }
.keydates .row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
}
.keydates .row:last-child { border-bottom: 0; }
.keydates dt { font-weight: 600; }
.keydates dd { margin: 0; color: var(--brand); white-space: nowrap; }

/* ----------------------------------------------------------------- table */

.table-wrap { overflow-x: auto; max-width: 860px; margin: 0 auto; }

table.dates {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
table.dates th,
table.dates td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
}
table.dates thead th {
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 0;
}
table.dates tbody tr:nth-child(even) { background: var(--wash); }
table.dates td:last-child { white-space: nowrap; }
table.dates tbody tr:last-child { font-weight: 600; }

.table-note {
  max-width: 860px;
  margin: 14px auto 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------------------------------------------------------- topics list  */

.topics {
  columns: 2;
  column-gap: 56px;
  max-width: 780px;
  margin: 0 auto 26px;
  padding: 0;
  list-style: none;
}
.topics li {
  break-inside: avoid;
  padding: 9px 0 9px 20px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 1px;
  background: var(--gold);
}

/* ------------------------------------------------------------- highlight */

.notice {
  border-left: 4px solid var(--brand);
  background: var(--brand-pale);
  padding: 16px 20px;
  margin: 0 0 20px;
  font-weight: 600;
}

.tba {
  font-style: italic;
  color: var(--muted);
}

/* --------------------------------------------------------------- details */

details.folded {
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand);
  background: var(--paper);
  padding: 0 24px;
  max-width: 78ch;
  margin: 0 auto;
}
details.folded > summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-family: var(--serif);
  font-size: 20px;
}
details.folded > summary::-webkit-details-marker { display: none; }
details.folded > summary::after {
  content: "+";
  float: right;
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
}
details.folded[open] > summary::after { content: "\2212"; }
details.folded > summary + * { border-top: 1px solid var(--rule); padding-top: 20px; }
details.folded .inner { padding-bottom: 26px; }

/* ------------------------------------------------------------ placeholder */

.placeholder-body {
  padding: 96px 0 110px;
  text-align: center;
}
.placeholder-body p {
  max-width: 60ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink);
}
.placeholder-body .back {
  margin-top: 36px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--footer-bg);
  border-top: 4px solid var(--gold);
  color: #c2cbd9;
  padding: 52px 0 34px;
  font-size: 15px;
}
.site-footer h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 18px;
}
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 8px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a9ab4;
}
.footer-bottom a { color: #8a9ab4; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------------------------------------ responsive */

/* Between 1210px and the full 1440px layout the one-row bar still fits, but
   only with tighter type and slightly smaller marks. */
@media (max-width: 1439px) and (min-width: 1211px) {
  .brand { gap: 12px; padding-right: 16px; }
  .logo-seal { height: 40px; width: 40px; }
  .logo-mark { height: 36px; width: 36px; }
  .logo-word { height: 34px; }
  .brand-divider { height: 32px; }
  .nav-list > li > a,
  .nav-list > li > button { padding: 14px 7px; font-size: 10.5px; letter-spacing: 0.05em; }
}

/* Below 1210px the nine top-level items can no longer fit on one row, so the
   bar collapses into the toggle menu. */
@media (max-width: 1210px) {
  .nav-toggle { display: block; }
  .brand-row { min-height: 72px; flex-wrap: wrap; }
  .logo-seal { height: 40px; width: 40px; }
  .logo-word { height: 34px; }
  .hero { height: calc(100vh - 72px); }

  .site-header { background: var(--paper); }
  .brand { align-self: auto; padding-right: 0; }
  .brand::before { display: none; }
  .site-nav { display: none; width: 100%; order: 3; }
  .site-nav.is-open {
    display: block;
    background: var(--brand);
    margin: 0 -24px;
    padding: 0 24px 10px;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li > a,
  .nav-list > li > button {
    width: 100%;
    justify-content: space-between;
    padding: 13px 4px;
    font-size: 12.5px;
    border-bottom: 1px solid rgba(255,255,255,0.16);
  }
  .nav-list > li.is-active > a { border-bottom-color: var(--gold); }
  .sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    border: 0;
    box-shadow: none;
    background: rgba(0,0,0,0.22);
    padding: 4px 0;
  }
  .has-sub.open > .sub { display: block; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.open > .sub { display: block; }
  .sub a { padding: 10px 18px; color: #e8eef8; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  /* Same full-screen photo hero on phones. A portrait viewport crops the
     photograph left and right, so the whole top-light / bottom-dark grade
     stays visible and the two type zones keep their contrast. */
  .hero {
    height: calc(100vh - 78px);
    min-height: 460px;
    max-height: none;
    background-position: center 44%;
  }
  .hero-upper { margin-bottom: 5vh; padding: 0 6%; }
  .hero-lower { padding: 0 6%; }
  .hero .eyebrow { font-size: 12px; letter-spacing: 0.16em; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(19px, 3.3vh, 27px); line-height: 1.5; }
  .hero-mark { font-size: clamp(34px, 6.2vh, 52px); margin-bottom: 34px; }
  .hero-theme { font-size: clamp(14px, 2.2vh, 19px); margin-bottom: 36px; }
  .hero-actions { gap: 10px; }
  .btn { padding: 13px 22px; font-size: 12px; }
  .page-head { padding: 20px 0 18px; }
  .page-head h1 { font-size: 22px; }
  .topics { columns: 1; }
  .keydates .row { flex-direction: column; gap: 2px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .logo-mark     { height: 36px; width: 36px; }
  .logo-seal     { height: 40px; width: 40px; }
  .logo-word     { height: 32px; }
  .logo-ph--zju  { width: 96px; }
  .logo-ph--deon { width: 108px; }
  .container { padding: 0 18px; }
  .site-nav.is-open { margin: 0 -18px; padding: 0 18px 10px; }
}

/* ------------------------------------------------------------------ print */

@media print {
  .site-nav, .nav-toggle, .skip-link { display: none; }
  .hero { background: none; color: #000; }
  body { font-size: 12pt; }
}

@media (max-height: 620px) {
  .hero-upper { margin-bottom: 3.4vh; }
  .hero-actions { display: none; }
}
