/* ACM CODASPY 2026 — site styles. Hand-written; no framework. */

/* ------------------------------------------------------------------ tokens */
:root {
  --ink:      #171a2e;   /* headings: near-black navy */
  --body:     #2f3241;
  --muted:    #6a7183;
  --accent:   #1c7ed6;   /* links, buttons */
  --accent-d: #1864ab;
  --violet:   #6741d9;   /* SIGSAC purple: timeline bullets, rules */
  --rule:     #dee2e6;
  --bg:       #ffffff;
  --bg-alt:   #f6f8fa;
  --warn:     #c92a2a;

  --wrap: 58rem;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem;  --s7: 3rem;   --s8: 4.5rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
}

a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-d); }

h1, h2, h3, h4 {
  line-height: 1.2; margin: 0 0 var(--s4);
  font-weight: 800; color: var(--ink); letter-spacing: -.015em;
}
p, ul, ol, table { margin: 0 0 var(--s4); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bg); color: var(--ink); padding: var(--s3) var(--s4);
}
.skip-link:focus { left: 0; }

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

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  background: #0b1020 center/cover no-repeat;
  color: #fff;
  display: flex; flex-direction: column;
}
.hero--tall  { min-height: 100vh; }
.hero--short { min-height: 30rem; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,12,26,.55) 0 18%,
                                      rgba(8,12,26,.30) 45%,
                                      rgba(8,12,26,.50));
}
.hero__inner {
  position: relative;
  flex: 1 1 auto;
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center;
  padding: var(--s8) var(--s5);
}
.hero__logo { width: 150px; margin-bottom: var(--s5); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  font-weight: 800; letter-spacing: -.03em;
  margin: 0 0 var(--s4); text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.hero .meta {
  margin: 0 0 var(--s2); font-size: 1.125rem; color: #eef2f8;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

/* ------------------------------------------------------- navigation overlay */
.site-header { position: relative; z-index: 10; }
.site-header .bar {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--s5);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: var(--s2) var(--s3);
  color: rgba(255,255,255,.92); text-decoration: none; font-size: .95rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.site-nav > ul > li > a:hover,
.site-nav > ul > li:hover > a,
.site-nav > ul > li:focus-within > a { color: #fff; }

.site-nav .has-menu { position: relative; }
.site-nav .has-menu > a::after {
  content: ""; display: inline-block; margin-left: .4em;
  border: .3em solid transparent; border-top-color: currentColor;
  transform: translateY(.15em);
}
.site-nav .menu {
  position: absolute; left: 0; top: 100%; min-width: 15.5rem;
  background: var(--bg); border-radius: 6px;
  box-shadow: 0 10px 30px rgba(10,20,40,.22);
  padding: var(--s2) 0; display: none;
}
.site-nav .has-menu:hover > .menu,
.site-nav .has-menu:focus-within > .menu { display: block; }
.site-nav .menu a {
  color: var(--body); padding: var(--s2) var(--s4); text-shadow: none;
}
.site-nav .menu a:hover { background: var(--bg-alt); color: var(--accent); }
.site-nav .menu .divider {
  height: 1px; background: var(--rule); margin: var(--s2) 0;
}
.site-nav .ext::after { content: " \2197"; color: var(--muted); font-size: .85em; }

.nav-toggle {
  display: none; margin-left: auto; order: 2;
  background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px; padding: var(--s2) var(--s3); cursor: pointer;
}
.nav-toggle__box,
.nav-toggle__box::before,
.nav-toggle__box::after {
  display: block; width: 20px; height: 2px; background: #fff;
}
.nav-toggle__box { position: relative; }
.nav-toggle__box::before { content: ""; position: absolute; top: -6px; }
.nav-toggle__box::after  { content: ""; position: absolute; top: 6px; }

/* ---------------------------------------------------------------- sections */
.page-title { font-size: clamp(2rem, 4vw, 2.6rem); margin: var(--s8) 0 var(--s5); }
.section { padding: 0 0 var(--s7); }
.section-title { font-size: 1.875rem; margin: var(--s7) 0 var(--s5); }
main > .section:first-child { padding-top: var(--s8); }
main > .page-title + .section { padding-top: 0; }
main > .page-title + .section > .section-title:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- timeline */
.timeline {
  list-style: none; margin: 0; padding: 0 0 0 2.5rem; position: relative;
}
.timeline::before {
  content: ""; position: absolute; left: .52rem; top: .6rem; bottom: .6rem;
  width: 2px; background: var(--rule);
}
.timeline > li { position: relative; padding-bottom: var(--s6); }
.timeline > li::before {
  content: ""; position: absolute; left: -2.5rem; top: .45rem;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--violet); box-shadow: 0 0 0 4px var(--bg);
}
.t-date { margin: 0 0 var(--s1); font-weight: 800; color: var(--ink); }
.t-body > :last-child { margin-bottom: 0; }
.t-body ul { margin-top: var(--s2); padding-left: var(--s5); }
.revised { color: var(--warn); font-weight: 700; }

/* ---------------------------------------------------------------- sponsors */
.tier + .tier { margin-top: var(--s6); }
.tier h3 {
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-align: center; margin-bottom: var(--s5);
  font-weight: 700;
}
.logos {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--s6) var(--s7); align-items: center;
}
.logos img { max-height: 72px; width: auto; }
.logos span { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.logos--hosts img { max-height: 104px; }

/* --------------------------------------------------------- important dates */
.dates { list-style: none; margin: 0 0 var(--s4); padding: 0; max-width: 42rem; }
.dates .date {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--rule); border-left: 4px solid var(--muted);
}
.dates .date + .date { border-top: 0; }
.dates .date.success { border-left-color: #2f9e44; }
.dates .date.info    { border-left-color: var(--accent); }
.dates .date.warning { border-left-color: #e8590c; }
.dates .date.danger  { border-left-color: var(--warn); }
.badge {
  background: var(--bg-alt); border: 1px solid var(--rule); border-radius: 999px;
  padding: .15em .75em; font-size: .9rem; white-space: nowrap;
}
.badge s { color: var(--muted); }

/* ------------------------------------------------------------------- cards */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}
.card {
  border: 1px solid var(--rule); border-radius: 6px;
  border-top: 3px solid var(--violet);
  padding: var(--s4);
}
.card h3 { font-size: 1.05rem; }
.card > :last-child { margin-bottom: 0; }
.byline { color: var(--muted); }

/* -------------------------------------------------- schedule overview grid */
.ov-legend {
  list-style: none; margin: 0 0 var(--s5); padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5);
  font-size: .9rem; color: var(--muted);
}
.ov-legend li { display: flex; align-items: center; gap: var(--s2); }
.ov-key {
  width: 1rem; height: 1rem; border-radius: 3px;
  border: 1px solid var(--rule); display: inline-block;
}
.ov-scroll { overflow-x: auto; margin-bottom: var(--s4); }
.ov-grid {
  display: grid;
  grid-template-columns: 3.5rem repeat(3, minmax(11rem, 1fr));
  grid-template-rows: auto repeat(var(--ov-rows), 13px);
  gap: 2px;
  min-width: 40rem;
}
.ov-day {
  font-weight: 800; color: var(--ink); text-align: center;
  padding: var(--s2) 0 var(--s3);
}
.ov-time {
  grid-column: 1; font-size: .78rem; color: var(--muted);
  text-align: right; padding-right: var(--s2);
  font-variant-numeric: tabular-nums; transform: translateY(-.55em);
}
.ov-slot {
  border-radius: 5px; padding: .3rem .5rem; overflow: hidden;
  display: flex; flex-direction: column; gap: .1rem;
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--rule); border-left-width: 3px;
  font-size: .82rem; line-height: 1.25;
}
.ov-slot:hover { filter: brightness(.97); color: var(--ink); }
.ov-title { font-weight: 700; }
.ov-sub, .ov-when { color: var(--muted); font-size: .76rem; }
.ov-when { margin-top: auto; font-variant-numeric: tabular-nums; }
.ov--tight { padding: .1rem .5rem; font-size: .74rem; justify-content: center; }
.ov--tight .ov-sub, .ov--tight .ov-when { display: none; }
.ov--keynote { background: #f3f0ff; border-left-color: var(--violet); }
.ov--session { background: #e7f5ff; border-left-color: var(--accent); }
.ov--break   { background: #f1f3f5; border-left-color: #adb5bd; }
.ov--social  { background: #fff9db; border-left-color: #f08c00; }
.ov-key.ov--tight { padding: .1rem .5rem; font-size: .74rem; justify-content: center; }
.ov--tight .ov-sub, .ov--tight .ov-when { display: none; }
.ov--keynote { background: #f3f0ff; border-color: var(--violet); }
.ov-key.ov--session { background: #e7f5ff; border-color: var(--accent); }
.ov-key.ov--break   { background: #f1f3f5; border-color: #adb5bd; }
.ov-key.ov--social  { background: #fff9db; border-color: #f08c00; }

/* ----------------------------------------------------------------- program */
.lede { font-size: 1.05rem; }
.daynav { font-weight: 700; }
.room { color: var(--muted); margin-top: calc(var(--s5) * -1 + var(--s3)); }
.agenda { list-style: none; margin: 0; padding: 0; }
.slot {
  border: 1px solid var(--rule); border-radius: 6px;
  margin-bottom: var(--s4); overflow: hidden;
}
.slot__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--s3);
  padding: var(--s3) var(--s4); background: var(--bg-alt);
  border-bottom: 1px solid var(--rule);
}
.slot__head h3 { margin: 0; font-size: 1.05rem; }
.slot__head .when {
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.slot--plain .slot__head { border-bottom: 0; background: var(--bg); }
.slot--session, .slot--keynote { border-left: 3px solid var(--violet); }
.talks { list-style: none; margin: 0; padding: 0; }
.talks li { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); }
.talks li:last-child { border-bottom: 0; }
.keynote { display: flex; flex-wrap: wrap; gap: var(--s5); padding: var(--s4); }
.keynote img { flex: 0 0 auto; align-self: flex-start; border-radius: 4px; }
.keynote > div { flex: 1 1 22rem; }
.keynote h4 { font-size: 1.05rem; margin-bottom: var(--s1); }
.keynote > div > :last-child { margin-bottom: 0; }
.kn-part { margin-top: var(--s4); }
.kn-part p { margin: var(--s2) 0 0; }
.chair {
  margin: 0; padding: var(--s3) var(--s4);
  border-top: 1px solid var(--rule); color: var(--muted); font-size: .95rem;
}

/* -------------------------------------------------------------- committees */
.people {
  list-style: none; margin: 0 0 var(--s5); padding: 0;
  columns: 2; column-gap: var(--s6);
}
.people li { break-inside: avoid; padding: .2rem 0; }
@media (max-width: 700px) { .people { columns: 1; } }

/* ------------------------------------------------------------------ embeds */
main iframe {
  display: block; border: 0;
  width: 100%; max-width: 40rem;
  height: auto; aspect-ratio: 4 / 3;
}

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin-bottom: var(--s4); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: var(--s3); border: 1px solid var(--rule); text-align: left; }
th { background: var(--bg-alt); font-weight: 700; color: var(--ink); }

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--ink); color: #c9cedb;
  padding: var(--s6) 0; margin-top: var(--s8);
  text-align: center; font-size: .9rem;
}
.site-footer p { margin: 0; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-basis: 100%; order: 3; }
  .site-nav.is-open {
    display: block;
    /* solid ground: the hero photo behind this can be any brightness */
    background: rgba(10,16,32,.97);
    border-radius: 6px;
    margin-bottom: var(--s3);
  }
  .site-header .bar { flex-wrap: wrap; }
  .site-nav > ul { display: block; padding-bottom: var(--s4); }
  .site-nav > ul > li > a { border-top: 1px solid rgba(255,255,255,.18); }
  .site-nav a { padding: var(--s3) var(--s4); min-height: 44px; }
  .nav-toggle { padding: var(--s3) var(--s4); min-height: 44px; min-width: 44px; }
  .site-nav .menu {
    position: static; display: none; box-shadow: none; border-radius: 0;
    background: rgba(255,255,255,.07); padding: 0;
  }
  .site-nav .has-menu:hover > .menu { display: none; }
  .site-nav .has-menu.is-open > .menu { display: block; }
  .site-nav .menu a {
    color: rgba(255,255,255,.92); padding-left: var(--s6);
    text-shadow: 0 1px 8px rgba(0,0,0,.45);
  }
  .site-nav .menu a:hover { background: rgba(255,255,255,.14); color: #fff; }
  .site-nav .menu .divider { background: rgba(255,255,255,.2); }
  .hero--tall  { min-height: 88vh; }
  .hero--short { min-height: 22rem; }
}

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

@media print {
  .site-header, .nav-toggle, .skip-link { display: none; }
  .hero { min-height: 0; color: var(--ink); background: none; }
  .hero::before { display: none; }
  .hero h1, .hero .meta { color: var(--ink); text-shadow: none; }
}
