/* ==========================================================
   SIAM @ IIT — SHARED STYLES
   Loaded on every page.
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Inter:wght@400;500;600&family=Newsreader:opsz,wght@6..72,400;6..72,500&display=swap");

:root {
  --paper: #eee9da;
  --ink: #11110f;
  --blue: #173a78;
  --cyan: #67c9c8;
  --green: #a8c681;
  --red: #c93b32;
  --rule: rgba(17, 17, 15, 0.35);
  --max: 1500px;
  --font-sans: "Inter", Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --font-mono: "DM Mono", monospace;
}

/* =========================================================
   GLOBAL
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 150ms ease;
}

a:hover {
  opacity: 0.58;
}

/* =========================================================
   MAIN PAGE SHELL
   ========================================================= */

.site-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 34px;
}

/* =========================================================
   TOP NAVIGATION
   ========================================================= */

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
}

.join-link {
  padding: 10px 13px;
  border: 1px solid var(--ink);
}

/* =========================================================
   GENERAL TYPOGRAPHY
   ========================================================= */

.fig-label,
.small-caps,
.vertex-caption,
.moire-caption {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.4;
  letter-spacing: 0.12em;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

h2 {
  margin-top: 18px;
  font-size: clamp(2.6rem, 5vw, 6rem);
}

.dek {
  max-width: 470px;
  margin-top: 34px;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.7vw, 1.65rem);
  line-height: 1.25;
}

.interior-title {
  font-size: clamp(4rem, 7vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin: 0 0 2rem;
}

.fig-label {
  font-size: 0.9rem;
  line-height: 1.25;
  letter-spacing: 0.14em;
}

.small-caps {
  margin-top: 28px;
  font-size: 0.85rem;
  line-height: 1.3;
}

.text-link {
  display: inline-block;
  margin-top: 30px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: 0.08em;
}

/* =========================================================
   STANDARD SECTIONS
   ========================================================= */

.rule-section {
  padding: 90px 0 120px;
  border-top: 1px solid var(--ink);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
}

.body-copy {
  align-self: end;
  max-width: 520px;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.38;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.site-footer div {
  display: flex;
  gap: 25px;
}

.site-footer a {
  font-size: 0.85rem;
}

small {
  font-size: 0.85rem;
}

/* =========================================================
   SHARED ARCHIVE CTA
   Used on Events and Dodgson's Tea Party.
   ========================================================= */

.calendar-archive-link {
  padding: 70px 0 85px;
  border-top: 1px solid var(--ink);
}

.calendar-archive-link a {
  color: var(--ink);
  text-decoration: none;
}

.calendar-archive-link .fig-label {
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.14em;
}

.archive-cta-title {
  max-width: 950px;
  margin: 0 !important;
  font-family: var(--font-sans);
  font-size: clamp(4.8rem, 7vw, 7.5rem) !important;
  font-weight: 500;
  line-height: 0.88 !important;
  letter-spacing: -0.055em;
}

.archive-cta-subtitle {
  max-width: 620px;
  margin: 34px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.35;
}

.calendar-archive-link .text-link {
  margin-top: 32px;
}

/* =========================================================
   JOIN MODAL
   ========================================================= */

.join-modal[hidden] {
  display: none;
}

.join-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.join-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 15, 0.35);
}

.join-modal-panel {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: 42px;
  background: var(--paper);
  border: 1px solid var(--ink);
}

.join-modal-panel h2 {
  margin-top: 18px;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 0.9;
}

.join-modal-panel p {
  max-width: 500px;
  margin: 28px 0 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.4;
}

.join-modal-email {
  display: inline-block;
  margin-top: 30px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.join-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

/* =========================================================
   SHARED MOBILE LAYOUT
   ========================================================= */

@media (max-width: 900px) {

  .site-shell {
    padding: 0 20px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 35px 0;
  }

}

/* =========================================================
   MOBILE HEADER
   ========================================================= */

.nav-toggle {
  display: none;
}

@media (max-width: 900px) {

  .topbar {
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--ink);
  }

  .wordmark {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.15;
    letter-spacing: 0.08em;
  }

  .nav-toggle {
    display: block;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    cursor: pointer;
  }

  .main-nav {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    padding: 18px 0 8px;
    border-top: 1px solid var(--rule);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    display: block;
    margin: 0;
    padding: 11px 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.2;
    letter-spacing: 0.07em;
    white-space: normal;
  }
  
    .join-link {
    width: auto;
    margin: 0;
    padding: 11px 0;
    border: 0;
  }

}


@media (max-width: 600px) {
  .join-modal-panel {
    padding: 34px 24px 28px;
  }

  .join-modal-panel h2 {
    font-size: 3rem;
  }
}

@media (min-width: 901px) {
  .main-nav a,
  .wordmark {
    font-size: 0.9rem;
  }
}

/* =========================================================
   ACCESSIBILITY / QUARTO CLEANUP
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.anchorjs-link,
.header-anchor,
a.anchorjs-link {
  display: none !important;
}
