/* ==========================================================
   COLORS & FONTS — change these variables to restyle the
   whole site (used by index.html and Publications.html).
   ========================================================== */
:root {
  --color-bg: #ccffff;         /* page background (original site color) */
  --color-surface: #ffffff;    /* nav buttons, cards */
  --color-text: #1c2226;       /* main text */
  --color-text-muted: #5c6b73; /* secondary text, dates */
  --color-border: #d7e1e4;     /* rules, table borders */
  --color-accent: #0b6e79;     /* links, headings underline */
  --color-accent-hover: #084f57;
  --color-note: #b3261e;       /* highlighted warnings/notes */
  --color-highlight: #33ffff;  /* course-page info-box background */
  --font-heading: Georgia, "Times New Roman", Times, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --content-max-width: 960px;  /* only used if you re-enable the cap below */
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  /* Page now always fills the available browser width.
     To cap line length again on very wide monitors, uncomment the next line: */
  /* max-width: var(--content-max-width); */
  padding: 2.5rem clamp(1.5rem, 4vw, 5rem) 4rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

a { color: var(--color-accent); text-decoration: none; }
a:hover, a:focus { color: var(--color-accent-hover); text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: normal; }

h1 { font-size: 2.2rem; margin: 0 0 .3rem; }
h1 a { color: var(--color-text); }
h1 a:hover { color: var(--color-accent); }

.subtitle { margin: 0 0 2rem; color: var(--color-text-muted); letter-spacing: .02em; }
.subtitle a { color: var(--color-text-muted); }

h2 {
  font-size: 1.45rem;
  margin: 2.75rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--color-accent);
}

h3 {
  font-size: 1.15rem;
  margin: 2rem 0 1rem;
  color: var(--color-accent);
}

p { margin: 0 0 1.25rem; }

hr { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }

/* generic sensible default for any plain table not covered by a specific class */
table { border-collapse: collapse; }
td, th { padding: .35rem .6rem; text-align: left; vertical-align: top; }

address { font-style: normal; }

.back-to-top { text-align: right; margin: .5rem 0 0; }
.back-to-top a { color: var(--color-text-muted); }

.justify { text-align: justify; }

.note { color: var(--color-note); }

/* ---- header: contact info / nav / photo (index.html only) ---- */
.header-layout { width: 100%; border-collapse: collapse; }
.header-layout td { vertical-align: middle; padding: 0 1rem; }
.contact-col { width: 37%; text-align: left; }
.nav-col { width: 28%; text-align: center; }
.photo-col { width: 37%; text-align: center; }

.nav-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.nav-item {
  text-align: center;
  padding: .6rem .5rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.nav-table tr:last-child .nav-item { border-bottom: none; }
.nav-item:hover { background: var(--color-bg); }
.nav-item a { font-weight: 600; }

.profile-photo {
  display: block;
  margin: 0 auto;
  width: 220px;
  max-width: 90%;
  height: auto;
  border-radius: 6px;
}

/* ---- content tables: Editorial / Collaborators / Meetings / Links (index.html only) ---- */
.content-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.content-table td { padding: .5rem .6rem; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.content-table tr:last-child td { border-bottom: none; }
.links-table td { vertical-align: middle; }
.links-table td:first-child { width: 40%; }
.links-table td:nth-child(2), .links-table td:nth-child(3) { width: 30%; }
.meetings-table td:nth-child(2) { color: var(--color-text-muted); white-space: nowrap; }

#last-updated { color: var(--color-text-muted); font-size: .9rem; }

/* ---- course pages (aaXXYY/*.html): highlighted info box ---- */
.course-info {
  margin: 1.5rem auto;
  width: 90%;
  border-collapse: separate;
  border-spacing: 3px;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
}
.course-info td {
  background: var(--color-highlight);
  text-align: center;
  vertical-align: middle;
  padding: .6rem 1rem;
}
/* two older pages used a green highlight instead of cyan -- preserved as-is */
.course-info--green td { background: #66ff99; }
/* the "ac" course line used a pink highlight -- preserved as-is */
.course-info--pink td { background: #ff99ff; }
/* the "as" course line used a yellow highlight -- preserved as-is */
.course-info--yellow td { background: #ffff66; }

/* ---- BibTeX toggle (Publications.html) ---- */
.bibtex-line {
  /* pull up close to the paper above it... */
  margin: -0.95rem 0 2rem;   /* ...and push the next paper clearly away */
}
.bibtex-toggle {
  font-size: .82rem;
  white-space: nowrap;
}
.bibtex-box {
  margin: -1.4rem 0 2rem;
  padding: .75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.bibtex-box pre {
  margin: 0 0 .6rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Courier New", monospace;
  font-size: .82rem;
  color: var(--color-text);
}
.bibtex-copy {
  font-size: .8rem;
  padding: .25rem .7rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}
.bibtex-copy:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* ---- small screens: stack the header table instead of squeezing columns ---- */
@media (max-width: 700px) {
  .header-layout, .header-layout tbody, .header-layout tr, .header-layout td,
  .nav-table, .nav-table tbody, .nav-table tr, .nav-table td {
    display: block;
    width: 100% !important;
  }
  .contact-col, .nav-col, .photo-col { padding: 1rem 0; text-align: center; }
}
