/* =====================================================================
   WISE 2027 — shared stylesheet (used by every page)

   Colours are taken from the West Lake banner photo
   (soft slate and lake blues, pale mist, sunset apricot)
   and are set once in :root below.
   The Lato font files are in fonts/ (no Google Fonts needed).
   home.css adds the styles used only on the home page.
   ===================================================================== */

@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/lato-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/lato-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/lato-700-normal.woff2") format("woff2"); }

:root {
  --primary: #3d5a75;   /* soft slate blue: headings, active menu          */
  --accent:  #3b6d96;   /* lake blue: links, menu hover                     */
  --warm:    #a35f28;   /* sunset amber: "2027", small labels (AA contrast)  */
  --warm-line: #dca577; /* soft apricot: underlines and thin accent lines   */
  --sky:     #9fbfd8;   /* evening sky: box borders                         */
  --pale:    #e8eff5;   /* pale mist: footer background                     */
  --pale2:   #dde8f2;   /* pale sky: countdown                              */
  --text:    #222;
  --muted:   #5f6673;
  --gray:    #f4f7fa;   /* misty white: card backgrounds                    */
  --line:    #e1e8ef;
  --width:   1200px;    /* page width                                       */
}

* { box-sizing: border-box; }

/* Always show the vertical scrollbar, so the header does not shift
   between long pages (with scrollbar) and short pages (without). */
html { overflow-y: scroll; }

body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links inside running text are underlined, so they do not rely on colour alone. */
p a, li .what a { text-decoration: underline; text-decoration-color: rgba(59, 109, 150, 0.45); text-underline-offset: 2px; }
p a:hover, li .what a:hover { text-decoration-color: currentColor; }
sup { line-height: 0; font-size: 0.6em; }

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

h2 { margin: 0 0 1rem; font-size: 1.6rem; line-height: 1.3; color: var(--primary); }
h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 0.5rem; background: var(--warm-line); }
h3 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; color: var(--primary); }
p { margin: 0 0 0.9rem; text-align: justify; }      /* justified paragraphs (两端对齐) */
ul { margin: 0 0 0.9rem; padding-left: 1.4rem; }
li { margin: 0.2rem 0; }

.eyebrow {                        /* small label above a heading */
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm);
}


/* ---------- Header: title + menu (generated by menu.js) ---------- */

#header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; }

.title { font-size: 1.9rem; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; }
.title a { color: #000; text-decoration: none; }
.title span { color: var(--warm); }

.topnav { display: flex; align-items: center; }
.dropdown { position: relative; }

.dropbtn {
  display: block;
  padding: 1.6rem 0.95rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  cursor: pointer;
}
.dropbtn:hover,
.dropdown:hover .dropbtn,
.dropdown:focus-within .dropbtn { color: var(--accent); border-bottom-color: var(--warm-line); text-decoration: none; }
.dropbtn.active { color: var(--primary); border-bottom-color: var(--warm-line); }

.arrow {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0 3px 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  padding: 0.4rem 0;
  background: #fff;
  border-top: 3px solid var(--warm-line);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content { display: block; }

.dropdown-content a { display: block; padding: 0.55rem 1.1rem; font-size: 0.95rem; color: #111; white-space: nowrap; }
.dropdown-content a:hover { background: var(--gray); color: var(--accent); text-decoration: none; }
.dropdown-content a.active { color: var(--primary); font-weight: 700; }

.menu-toggle { display: none; }   /* phones only, see bottom */


/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border: 2px solid #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.btn:hover { background: rgba(255, 255, 255, 0.22); text-decoration: none; }
.btn.dark { border-color: var(--primary); color: var(--primary); }
.btn.dark:hover { background: var(--primary); color: #fff; }


/* ---------- Countdown (numbers filled in by menu.js) ---------- */

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; text-align: center; }
.cd-unit {
  padding: 0.6rem 0.2rem 0.5rem;
  background: var(--pale2);
  color: #4f6680;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cd-unit span { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.15; letter-spacing: 0; color: var(--primary); }
.cd-msg { margin: 0; grid-column: 1 / -1; font-weight: 700; color: var(--primary); }   /* shown during / after the conference */


/* ---------- Topic tags and timeline (home page and Call for Papers) ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.tags li {
  margin: 0;
  padding: 0.4rem 0.85rem;
  border: 1px solid #cfdceb;
  border-radius: 999px;
  background: #fff;
  font-size: 0.92rem;
  color: var(--primary);
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; margin: 0; padding: 0 0 1.3rem 1.6rem; border-left: 2px solid var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--sky);
}
.timeline li.key::before { background: var(--warm-line); border-color: var(--warm-line); }
.timeline .when { display: block; font-weight: 700; color: var(--primary); }
.timeline .what { display: block; color: var(--text); }
.timeline del { font-weight: 400; color: var(--muted); }   /* extended deadline: old date */
.note-small { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }


/* ---------- Inner pages: photo header with the page title ---------- */

.page-hero {
  position: relative;
  padding: 3.6rem 0 3.2rem;
  color: #fff;
  background: #3d5a75 url("images/banner.jpg") 78% 62% / cover no-repeat;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 35, 55, 0.66) 0%, rgba(20, 35, 55, 0.38) 60%, rgba(20, 35, 55, 0.12) 100%);
}
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: #f3d2b0; }
.page-hero h1 { margin: 0; font-size: 2.5rem; line-height: 1.2; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.page-hero .lead { max-width: 640px; margin: 0.8rem 0 0; font-size: 1.1rem; text-align: left; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }


/* ---------- Call for Papers: contents list on the left ---------- */

.with-toc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 3.5rem;
  max-width: var(--width);
  margin: 0 auto;
  padding: 3.5rem 24px 4rem;
}
.toc { position: sticky; top: 100px; align-self: start; }
.toc p { margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.toc a { display: block; padding: 0.45rem 0.9rem; border-left: 2px solid var(--line); font-size: 0.95rem; color: var(--muted); }
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.active { border-left-color: var(--warm-line); color: var(--primary); font-weight: 700; }
.with-toc section { margin-bottom: 3.2rem; scroll-margin-top: 100px; }
.with-toc section:last-child { margin-bottom: 0; }

.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.policy-card { padding: 1.3rem 1.4rem; background: var(--gray); border-top: 3px solid var(--sky); }
.policy-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.policy-card p { margin: 0; font-size: 0.95rem; text-align: left; }


/* ---------- Organising Committee: one card per role ---------- */

.committee { max-width: var(--width); margin: 0 auto; padding: 3.5rem 24px 4rem; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.role { padding: 1.1rem 1.3rem; background: var(--gray); border-left: 3px solid var(--warm-line); }
.role h2 { margin: 0 0 0.5rem; color: var(--primary); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.role h2::after { content: none; }
.role ul { list-style: none; padding: 0; margin: 0; }
.role li { margin: 0 0 0.45rem; }
.role li:last-child { margin-bottom: 0; }
.role .name { display: block; font-weight: 700; }
.role .aff { display: block; font-size: 0.92rem; color: var(--muted); }


/* ---------- Footer (generated by menu.js) ---------- */

#footer { margin-top: 1rem; background: var(--pale); color: #4a5d70; font-size: 0.9rem; border-top: 3px solid var(--sky); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-top: 2.6rem; padding-bottom: 2rem; }
#footer h3 { margin: 0 0 0.7rem; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
#footer ul { list-style: none; padding: 0; margin: 0; }
#footer li { margin: 0.25rem 0; }
#footer a { color: var(--accent); }
#footer .footer-name { margin-bottom: 0.4rem; font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1.5rem; padding: 1rem 0 1.3rem; border-top: 1px solid rgba(61, 90, 117, 0.18); font-size: 0.8rem; color: #566a7e; }
.footer-bottom a { color: var(--accent); }


/* ---------- Narrow screens ---------- */

@media (max-width: 1060px) {
  .dropbtn { padding-left: 0.6rem; padding-right: 0.6rem; font-size: 0.8rem; }
}

@media (max-width: 1000px) {
  .roles { grid-template-columns: repeat(2, 1fr); }
}

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

@media (max-width: 860px) {
  .with-toc { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
  .toc {                          /* contents list becomes a row of chips */
    position: sticky;
    top: 60px;
    z-index: 10;
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0.6rem 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .toc p { display: none; }
  .toc a { flex: none; padding: 0.3rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; }
  .toc a.active { border-color: var(--warm-line); }
  .with-toc section { scroll-margin-top: 120px; }
  .policy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  p { text-align: left; }
  .container, .with-toc, .committee { padding-left: 16px; padding-right: 16px; }
  .nav-bar { min-height: 60px; }
  .title { font-size: 1.5rem; }

  /* menu opens with the button */
  .menu-toggle {
    display: block;
    width: 40px;
    height: 40px;
    padding: 9px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
  }
  .menu-toggle span { display: block; height: 2px; margin: 4px 0; background: #111; }
  .topnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.4rem 16px 1rem;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  }
  #header.open .topnav { display: flex; }
  .dropbtn { padding: 0.7rem 0 0.2rem; border: 0; font-size: 0.75rem; color: var(--muted); }
  a.dropbtn { font-size: 0.9rem; color: #111; }
  .dropdown:hover .dropbtn { border: 0; }
  .arrow { display: none; }
  .dropdown-content { display: block; position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; }
  .dropdown-content a { padding: 0.35rem 0; }

  .page-hero { padding: 2.6rem 0 2.4rem; }
  .page-hero h1 { font-size: 1.8rem; }
  .roles { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
