/* ACNS 2027 workshop website — stylesheet */

/* ---------- Design tokens ---------- */

:root {
  --color-bg: #fbfaf7;
  --color-bg-alt: #f3f1eb;
  --color-surface: #ffffff;
  --color-rule: #e4e0d7;
  --color-rule-strong: #cdc6b8;

  --color-ink: #17202a;
  --color-ink-soft: #3a4350;
  --color-ink-muted: #59626f;

  --color-accent: #0c5c63;
  --color-accent-strong: #073f45;
  --color-accent-tint: #e6f0ef;
  --color-accent-line: #86b3b1;

  --color-tba-ink: #6b4f12;
  --color-tba-bg: #f8f1df;
  --color-tba-border: #a3823b;

  --color-banner: #0f3439;
  --color-footer: #15202a;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --font-serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);

  --container-max: 70rem;
  --container-pad: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section-space: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  --header-height: 3.75rem;
  --radius: 8px;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html.smooth-scroll {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.625rem, 1.4rem + 1vw, 2rem);
  letter-spacing: -0.015em;
}

h3 {
  margin-top: 1.75rem;
  font-size: 1.25rem;
}

p,
ul,
dl {
  margin: 0 0 1rem;
}

dd {
  margin: 0;
}

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

abbr[title] {
  text-decoration: none;
}

time,
.nowrap {
  white-space: nowrap;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-accent-line);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-accent-strong);
  text-decoration-color: currentColor;
}

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

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--color-ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--container-pad));
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* "TBA" label */
.tba {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.05em 0.6em 0.1em;
  border: 1px dashed var(--color-tba-border);
  border-radius: 999px;
  background: var(--color-tba-bg);
  color: var(--color-tba-ink);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.tba::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

/* Obfuscated e-mail address: plain text until main.js adds the link */
a.email:not([href]) {
  color: inherit;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  background: var(--color-accent-strong);
  color: #fff;
}

/* ---------- Header and navigation ---------- */

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

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.4rem;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--color-ink);
}

.brand-logo {
  width: 2.25rem;
  height: 2.25rem;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0;
  color: var(--color-ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-rule-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  width: 1.125rem;
  height: 0.875rem;
  border-block: 2px solid currentColor;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 2px solid currentColor;
  transform: translateY(-50%);
}

.nav-toggle-icon::after {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  border-color: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  transform: translateY(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  display: block;
  transform: translateY(-50%) rotate(-45deg);
}

/* Keep in sync with COMPACT_NAV in js/main.js */
@media (max-width: 51.99em) {
  .site-nav {
    flex-basis: 100%;
  }

  .no-js .site-header {
    position: static;
  }

  .no-js .nav-list {
    column-gap: 1.25rem;
    padding-bottom: 0.5rem;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding-inline: var(--container-pad);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-rule-strong);
    box-shadow: 0 12px 20px -14px rgba(23, 32, 42, 0.3);
  }

  .js .site-header.is-open .site-nav {
    display: block;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .js .nav-list {
    flex-direction: column;
    padding-bottom: 0.5rem;
  }

  .js .nav-list a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-rule);
    font-size: 1rem;
  }

  .js .nav-list li:last-child a {
    border-bottom: 0;
  }
}

@media (max-width: 22.5em) {
  .header-inner {
    column-gap: 0.75rem;
  }

  .brand {
    gap: 0.45rem;
    font-size: 1.0625rem;
  }

  .brand-logo {
    width: 1.875rem;
    height: 1.875rem;
  }

  .js .nav-toggle {
    padding-inline: 0.7rem;
  }
}

@media (max-height: 30em) {
  .site-header {
    position: relative;
  }
}

/* ---------- Banner ---------- */

.hero {
  padding-block: clamp(2.25rem, 1.5rem + 3vw, 3.75rem) clamp(2rem, 1.5rem + 2vw, 2.75rem);
  background-color: var(--color-banner);
  background-image:
    linear-gradient(100deg, rgba(9, 27, 33, 0.88) 0%, rgba(9, 27, 33, 0.76) 50%, rgba(9, 27, 33, 0.55) 100%),
    url("../assets/founders_building.jpg");
  background-position: center 40%;
  background-size: cover;
  color: #fff;
}

.hero-head {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.5rem + 2vw, 1.75rem);
}

.hero-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(4.5rem, 3.25rem + 4vw, 7rem);
  height: clamp(4.5rem, 3.25rem + 4vw, 7rem);
  border-radius: 50%;
  background: var(--color-bg);
}

.hero-badge img {
  width: 84%;
  height: auto;
}

.hero h1 {
  min-width: 0;
  margin: 0;
  color: #fff;
  overflow-wrap: anywhere;
}

.hero-name {
  display: block;
  font-size: clamp(2.125rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-fullname {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.0625rem, 0.95rem + 0.7vw, 1.4375rem);
  font-weight: 500;
  line-height: 1.3;
}

.facts {
  display: grid;
  gap: 1rem 2rem;
  margin: clamp(1.5rem, 1rem + 2vw, 2.25rem) 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.facts dt {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.facts dd {
  margin-top: 0.15rem;
  font-weight: 600;
  line-height: 1.4;
}

.fact-detail {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  font-weight: 400;
}

@media (min-width: 36em) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60em) {
  .facts {
    grid-template-columns: 1.45fr 1fr 0.75fr 1.2fr;
  }
}

.hero-cta {
  margin: 1.75rem 0 0;
}

.hero .button {
  background: var(--color-bg);
  color: var(--color-accent-strong);
}

.hero .button:hover {
  background: var(--color-accent-tint);
  color: var(--color-accent-strong);
}

.hero :focus-visible {
  outline-color: #fff;
}

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

.section {
  padding-block: var(--section-space);
}

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

/* ---------- Call for Papers ---------- */

.cfp-layout {
  display: grid;
  gap: 2rem;
}

.cfp-main {
  max-width: 46rem;
}

.cfp-main > :last-child {
  margin-bottom: 0;
}

.cfp-aside {
  display: grid;
  align-content: start;
  gap: 1rem;
}

@media (min-width: 40em) and (max-width: 59.99em) {
  .cfp-aside {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

@media (min-width: 60em) {
  .cfp-layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 3.5rem;
    align-items: start;
  }

  .cfp-main {
    grid-column: 1;
    grid-row: 1;
  }

  .cfp-aside {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    grid-column: 2;
    grid-row: 1;
  }
}

.topics {
  padding-left: 1.25rem;
}

.topics li {
  margin-bottom: 0.4rem;
  padding-left: 0.2rem;
}

.topics li::marker {
  color: var(--color-accent);
}

.details {
  border-top: 1px solid var(--color-rule);
}

.details > div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--color-rule);
}

.details dt {
  font-weight: 600;
}

@media (max-width: 29.99em) {
  .details > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

.details-note {
  margin-top: 0.85rem;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
}

.requirement {
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--color-accent-tint);
}

.requirement strong {
  display: block;
  margin-bottom: 0.3rem;
}

/* Side boxes: dates and contact */
.box {
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.box h2 {
  margin-bottom: 0.6rem;
  font-size: 1.125rem;
  letter-spacing: 0;
}

.box > :last-child {
  margin-bottom: 0;
}

.box p {
  font-size: var(--text-sm);
}

.dates {
  font-size: var(--text-sm);
}

.dates > div {
  display: grid;
  grid-template-columns: minmax(min-content, 1fr) auto;
  align-items: baseline;
  column-gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--color-rule);
}

.dates dt {
  font-weight: 600;
}

.dates dd {
  overflow-wrap: anywhere;
  text-align: right;
}

.dates time {
  white-space: normal;
}

.dates .date-note {
  grid-column: 1 / -1;
  margin-top: 0.1rem;
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  text-align: left;
}

/* Compact live countdown to the fixed AoE submission deadline. */
.deadline-countdown {
  margin-top: 0.8rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--color-accent-line);
  border-radius: var(--radius);
  background: var(--color-accent-tint);
}

.deadline-countdown[hidden],
.deadline-countdown__timer[hidden] {
  display: none;
}

.deadline-countdown__title {
  margin: 0 0 0.3rem;
  color: var(--color-accent-strong);
  font-size: var(--text-sm);
  font-weight: 700;
}

.deadline-countdown__timer {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: clamp(0.3rem, 2vw, 0.65rem);
  color: var(--color-accent-strong);
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  line-height: 1.3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.deadline-countdown__part {
  display: inline-flex;
  gap: 0.1em;
  align-items: baseline;
  font-weight: 700;
}

.deadline-countdown__suffix {
  font-size: 0.7em;
  font-weight: 500;
}

/* ---------- Organization ---------- */

.org-grid {
  display: grid;
  gap: 1.5rem 3rem;
}

@media (min-width: 48em) {
  .org-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.org-grid h3,
.location-grid h3 {
  margin-top: 0;
}

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.person {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.person-photo {
  flex: none;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.person > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.person p {
  margin: 0;
}

.person-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.person-affiliation {
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
}

.org-contact {
  margin: 0;
  overflow-wrap: anywhere;
}

.pc-list {
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.pc-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-rule);
}

/* ---------- Location and registration ---------- */

.location-grid {
  display: grid;
  gap: 1rem 3rem;
}

@media (min-width: 48em) {
  .location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.site-footer {
  padding-block: 1.75rem;
  background: var(--color-footer);
  color: #d5dce3;
  font-size: var(--text-sm);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #a6dcd9;
  text-decoration-color: rgba(166, 220, 217, 0.5);
}

.site-footer a:hover {
  color: #fff;
}

.site-footer :focus-visible {
  outline-color: #fff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 2rem;
}

/* ---------- Preferences and print ---------- */

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

@media (forced-colors: active) {
  .button,
  .nav-toggle,
  .tba,
  .box,
  .person {
    border: 1px solid CanvasText;
  }
}

@media print {
  .site-header,
  .skip-link,
  .hero-cta {
    display: none;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .hero {
    background: none;
    color: #000;
  }

  .hero h1,
  .hero-fullname,
  .facts dt,
  .fact-detail {
    color: #000;
  }

  .section,
  .section--alt {
    padding-block: 1.25rem;
    background: none;
    border: 0;
  }

  .cfp-aside {
    position: static;
  }

  .site-footer {
    background: none;
    color: #000;
  }
}
