/* Galaxy Disks 2027 — base stylesheet
   The site's EB Garamond font is self-hosted under assets/vendor/fonts/.
   No external font service or CDN is needed; scripts outside the Latin
   subsets fall back to the system serif fonts in --font-heading. */

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/eb-garamond/eb-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/eb-garamond/eb-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/eb-garamond/eb-garamond-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("../vendor/fonts/eb-garamond/eb-garamond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-primary: #8a1538;
  --color-primary-dark: #6a0f2a;
  --color-accent: #c9a227;
  --color-bg: #faf8f5;
  --color-bg-alt: #ffffff;
  --color-text: #232323;
  --color-text-muted: #5a5a5a;
  --color-border: #e4ddd0;
  --color-ok: #2f7a3d;
  --color-pending: #a06a12;
  /* Sans stack, kept in case a specific element (e.g. UI chrome) ever
     needs to opt out of the site-wide serif below. */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-heading: "EB Garamond", Garamond, Georgia, "Iowan Old Style",
    "Songti SC", "STSong", serif;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 20px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

img {
  max-width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--color-text);
  font-size: 1.05rem;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--color-text);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-primary);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

@media (max-width: 1100px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
  }

  .site-nav a {
    display: block;
    padding: 0.6rem 0;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, #fff 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero-inner {
  padding: 3.5rem 0 3rem;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: 2.1rem;
  margin: 0.5rem 0 1rem;
}

.hero-lede {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin: 0 auto 1.5rem;
  max-width: 620px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.hero-meta strong {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.35em;
}

/* ---------- Poster ---------- */

.poster-section {
  padding-top: 0;
  padding-bottom: 2.5rem;
}

.poster-figure {
  margin: 0;
  text-align: center;
}

.poster-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.poster-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

/* ---------- Notice banner ---------- */

.notice {
  background: #fff8e6;
  border: 1px solid #eddca0;
  color: #6b5410;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

/* ---------- Sections ---------- */

.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--color-text-muted);
  max-width: 720px;
  margin-bottom: 2rem;
}

/* ---------- Theme day badge (shared by home + program pages) ---------- */

.theme-day {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* ---------- Full theme blocks (home + program pages) ---------- */

.theme-block {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 0 0.75rem 1.25rem;
  margin-bottom: 2rem;
}

.theme-block-content {
  flex: 1 1 auto;
  min-width: 0;
}

.theme-block h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.2rem;
}

.theme-block p {
  margin: 0;
  color: var(--color-text-muted);
}

.theme-block-image {
  flex: 0 0 auto;
  width: 160px;
}

.theme-block-image img {
  display: block;
  width: 100%;
  height: auto;
}

.speaker-theme-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

.speaker-theme {
  border-left: 3px solid var(--color-accent);
  margin: 0 0 1rem;
  padding: 0.2rem 0 0.2rem 1rem;
}

.speaker-theme .theme-day {
  margin-bottom: 0.3rem;
}

.speaker-theme h3 {
  font-size: 1.15rem;
  margin: 0;
}

@media (max-width: 700px) {
  html {
    font-size: 17px;
  }

  .hero-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .section h1 {
    font-size: 1.8em;
  }

  .hero-meta > div {
    max-width: 100%;
  }

  .theme-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .theme-block-image {
    width: 120px;
    align-self: center;
  }
}

.cross-cutting-list {
  padding-left: 1.25rem;
}

.cross-cutting-list li {
  margin-bottom: 0.6rem;
}

/* ---------- Tables (committee and program) ---------- */

.table-wrap {
  overflow-x: auto;
}

table.committee-table,
table.program-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-alt);
  font-size: 0.95rem;
}

table.committee-table caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: 0.5rem;
}

table.committee-table th,
table.committee-table td,
table.program-table th,
table.program-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
}

table.committee-table thead th,
table.program-table thead th {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.program-table {
  min-width: 620px;
}

table.program-table tbody td {
  vertical-align: top;
}

table.program-table th:first-child {
  width: 145px;
}

table.program-table th:nth-child(2) {
  width: 30%;
}

.schedule-day + .schedule-day {
  margin-top: 2.75rem;
}

.schedule-day h3 {
  font-size: 1.3rem;
  margin: 0 0 0.85rem;
}

.schedule-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-export {
  margin: 1.5rem 0;
}

.schedule-export .btn {
  font-family: inherit;
  cursor: pointer;
}

.schedule-export .btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.schedule-export p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}

.print-only {
  display: none;
}

table.program-table .schedule-activity td {
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-confirmed {
  background: #e6f4e8;
  color: var(--color-ok);
}

.badge-pending {
  background: #fbeed6;
  color: var(--color-pending);
}

/* ---------- People grid (SOC photos) ---------- */

.soc-section {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(rgba(250, 248, 245, 0.85), rgba(250, 248, 245, 0.85)),
    url("../img/background_galaxy_3.png");
  background-position: center, center top;
  background-size: cover, contain;
  background-repeat: no-repeat;
}

.soc-section .people-grid {
  margin-bottom: 0;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.75rem 1.25rem;
  margin: 1.5rem 0 2.5rem;
}

#soc-grid,
#soc-cochairs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.15rem 0.75rem;
}

#soc-grid .person-card,
#soc-cochairs .person-card {
  flex: 0 0 calc(25% - 0.5625rem);
}

#soc-cochairs {
  margin-top: 2rem;
}

.person-card {
  text-align: center;
}

.person-photo {
  width: 140px;
  height: 140px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  object-fit: cover;
  display: block;
}

.soc-section .person-photo {
  width: 160px;
  height: 160px;
}

@media (max-width: 900px) {
  #soc-grid .person-card,
  #soc-cochairs .person-card {
    flex-basis: calc(33.333% - 0.5rem);
  }
}

@media (max-width: 600px) {
  #soc-grid .person-card,
  #soc-cochairs .person-card {
    flex-basis: calc(50% - 0.375rem);
  }
}

@media (max-width: 420px) {
  #soc-grid .person-card,
  #soc-cochairs .person-card {
    flex-basis: 100%;
  }
}

.person-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.person-name {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.person-role {
  color: var(--color-text-muted);
  font-weight: 400;
}

.person-institution {
  margin: 0 0 0.4rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  font-weight: 500;
}

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

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
}

.btn:hover,
.btn:focus {
  background: var(--color-primary-dark);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-inner .btn-row {
  justify-content: center;
}

/* ---------- Registration cards ---------- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.info-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

/* ---------- Venue and travel information ---------- */

.travel-list {
  max-width: 760px;
}

.travel-item + .travel-item {
  margin-top: 2rem;
}

.travel-item h2 {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
}

.travel-icon {
  flex: 0 0 1.6rem;
  text-align: center;
  line-height: 1;
}

.travel-item p {
  margin: 0;
  padding-left: 2.25rem;
}

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

.contact-block {
  max-width: 640px;
  margin-bottom: 2rem;
}

.contact-block h3 {
  font-size: 1.2rem;
}

.organizer-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.organizer-row:last-child {
  margin-bottom: 0;
}

.organizer-row p {
  margin: 0;
  overflow-wrap: anywhere;
}

.organizer-photo {
  width: 104px;
  height: 104px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  object-fit: cover;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: 0.88rem;
  padding: 2rem 0;
  margin-top: 2rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer .footer-status {
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

@page {
  size: A4;
  margin: 16mm;
}

@media print {
  html {
    font-size: 11pt;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 1rem;
  }

  #site-header,
  #site-footer,
  .schedule-export,
  .theme-block-image {
    display: none !important;
  }

  body[data-page="program"] > .section:not(#schedule-section),
  body[data-page="program"] #schedule-section .section-intro {
    display: none !important;
  }

  body[data-page="program"] .schedule-print-header {
    display: block;
    margin-bottom: 1rem;
  }

  .schedule-print-header h1 {
    font-size: 16pt;
    margin: 0 0 0.35rem;
  }

  .schedule-print-header p {
    font-size: 10pt;
    margin: 0 0 0.25rem;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .section {
    padding: 0 0 1rem;
  }

  .section-alt {
    background: transparent;
    border: 0;
  }

  body[data-page="program"] #schedule-section h2 {
    font-size: 14pt;
  }

  .theme-block {
    display: block;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .speaker-theme {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }

  table.program-table {
    min-width: 0;
  }

  table.program-table thead {
    display: table-header-group;
  }

  table.program-table th,
  table.program-table td {
    padding: 0.15rem 0.3rem;
    line-height: 1.3;
  }

  table.program-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .schedule-day + .schedule-day {
    margin-top: 1rem;
  }

  .schedule-day .theme-day {
    margin-bottom: 0.2rem;
    break-after: avoid;
    page-break-after: avoid;
  }

  .schedule-day h3 {
    margin-bottom: 0.4rem;
    break-after: avoid;
    page-break-after: avoid;
  }
}
