/* ==========================================================================
   fulp.cs.wfu.edu
   Rules, not boxes. No images, no webfonts, no external requests.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */

:root {
  --paper:      #FDFDFC;
  --ink:        #141414;
  --muted:      #5A5A5A;
  --faint:      #737373;
  --rule:       rgba(20, 20, 20, 0.18);
  --rule-hard:  rgba(20, 20, 20, 0.55);
  --gold:       #9E7E38;  /* localWakeGold, from fulpLectureSlides_v3.sty */
  --gold-text:  #8A6D2E;  /* darkened for small text; AA on paper */

  --serif: Charter, "Charis SIL", "Bitstream Charter", "Sitka Text", Cambria,
           Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, Futura, "Century Gothic", "Trebuchet MS",
          ui-sans-serif, system-ui, sans-serif;

  --measure: 46rem;
  --step: 1.5rem;
}

/* The site is light by default and does not follow the system dark setting.
   To opt in to the dark palette, put data-theme="dark" on the <html> element. */
:root[data-theme="dark"] {
  --paper:     #121211;
  --ink:       #E8E6E1;
  --muted:     #A09C94;
  --faint:     #7C7870;
  --rule:      rgba(232, 230, 225, 0.20);
  --rule-hard: rgba(232, 230, 225, 0.60);
  --gold:      #C9A961;
  --gold-text: #C9A961;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;      /* 18px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* --- Links ---------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  transition: background-color 120ms ease;
}

a:hover { background-color: color-mix(in srgb, var(--gold) 14%, transparent); }

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

/* --- Skip link ------------------------------------------------------------ */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip:focus { left: 1rem; top: 1rem; }

/* --- Shell ---------------------------------------------------------------- */

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

/* --- Masthead ------------------------------------------------------------- */

.masthead { padding-top: 4rem; text-align: center; }

.wordmark {
  display: inline-block;
  font-family: var(--sans);
  font-size: clamp(1.75rem, 6vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-indent: 0.16em;   /* optically re-center the trailing letterspace */
  line-height: 1.1;
  margin: 0;
  border: 0;
}

.wordmark a {
  border: 0;
  color: inherit;
}

.wordmark a:hover { background: none; }

.subtitle {
  font-family: var(--sans);
  font-size: 0.6875rem;   /* 11px */
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.1rem 0 0;
  text-indent: 0.3em;
}

/* --- Navigation ----------------------------------------------------------- */

.main-nav {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule-hard);
  border-bottom: 1px solid var(--rule-hard);
  padding: 0.9rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2.5rem;
}

.main-nav a {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  text-indent: 0.24em;
}

.main-nav a:hover {
  color: var(--ink);
  background: none;
}

.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* --- Main ----------------------------------------------------------------- */

main { padding: 4.5rem 0 2rem; }

/* --- Sections: a hairline, a tracked label, then the heading --------------- */

.section {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
  margin-top: 4rem;
}

/* The nav's bottom rule already closes the header; a second hairline
   immediately below it reads as a stray line. */
.section:first-of-type {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.85rem;
  text-indent: 0.28em;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}

h1.page-title,
h2 { font-size: 1.55rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.125rem; margin: 2.25rem 0 0.4rem; }
h4 { font-size: 1rem; margin: 1.75rem 0 0.3rem; }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.25rem; line-height: 1.6; }

.note {
  color: var(--muted);
  font-size: 1rem;
}

/* --- Framed block: LaTeX \fbox, label straddling the top rule -------------- */

.frame {
  border: 1px solid var(--rule-hard);
  padding: 2rem 1.75rem 1.75rem;
  margin: 2rem 0;
}

.frame > .frame-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  display: table;
  padding: 0 0.75rem;
  margin: -2.65rem 0 1.25rem -0.5rem;
  text-indent: 0.28em;
}

.frame h2,
.frame h3:first-of-type { margin-top: 0; }

.frame h2 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.frame p:last-child { margin-bottom: 0; }

/* --- Entry list: year gutter + content, hairline between rows -------------- */

.entries { border-bottom: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0 1.5rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
}

.entry-year {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.entry-title { display: block; }

.entry-meta {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 0.2rem;
}

.entry-meta .self { color: var(--ink); }

.entry-note {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-top: 0.45rem;
}

/* --- Plain rule-separated list (sponsors, links) -------------------------- */

.ruled-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--rule);
}

.ruled-list li {
  border-top: 1px solid var(--rule);
  padding: 0.7rem 0;
  font-size: 1rem;
}

/* --- Name roster: dense, comma-flowed ------------------------------------- */

.roster {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* --- Definition grid: contact details ------------------------------------- */

.defs {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.55rem 1.5rem;
  margin: 0;
  font-size: 1rem;
}

.defs dt {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.28rem;
  text-indent: 0.2em;
}

.defs dd { margin: 0; }

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

footer {
  border-top: 1px solid var(--rule-hard);
  margin-top: 5rem;
  padding: 2.25rem 0 4rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
}

.footer-cols h2 {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.75rem;
  text-indent: 0.28em;
}

.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-cols li { margin-bottom: 0.4rem; }

.colophon {
  margin-top: 2.5rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* --- Small screens -------------------------------------------------------- */

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  .masthead { padding-top: 2.5rem; }
  main { padding-top: 3rem; }
  .main-nav { gap: 0.5rem 1.5rem; }
  .entry { grid-template-columns: 1fr; gap: 0.3rem; }
  .entry-year { order: -1; }
  .defs { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .defs dd { margin-bottom: 0.7rem; }
  .frame { padding: 2rem 1.15rem 1.25rem; }
}

/* --- Print ---------------------------------------------------------------- */

@media print {
  :root {
    --paper: #fff; --ink: #000; --muted: #333;
    --faint: #555; --rule: #bbb; --rule-hard: #000; --gold: #000;
  }
  body { font-size: 10.5pt; }
  .main-nav, .skip, footer { display: none; }
  a { border-bottom: 0; }
  .entry, .section { break-inside: avoid; }
}
