/* jemdoc_i2lab.css — Modern redesign for Intelligent Imaging Lab */

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

:root {
  --gold:      #CEB888;
  --gold-dark: #a8924e;
  --black:     #1a1a1a;
  --gray-50:   #f8f8f8;
  --gray-200:  #e4e4e4;
  --gray-500:  #777;
  --gray-700:  #444;
  --link:      #1a5299;
}

/* ── Layout ──────────────────────────────────────── */

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--black);
  background: #fff;
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────── */

#sidebar {
  width: max-content;
  min-width: 180px;
  min-height: 100vh;
  background: #191919;
  color: #bbb;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: #333 #191919;
  padding-bottom: 2rem;
}

/* First .nav-category ("Intelligent Imaging Lab") becomes the sidebar header */
#sidebar .nav-category:first-of-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 1.4rem 1.1rem 1rem;
  border-bottom: 1px solid #2d2d2d;
  margin-bottom: 0.4rem;
}

.nav-category {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
  padding: 0.9rem 1.1rem 0.2rem;
  white-space: nowrap;
}

.nav-item a {
  display: block;
  padding: 0.28rem 1.1rem 0.28rem 1.4rem;
  font-size: 0.8rem;
  color: #aaa;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  line-height: 1.4;
  white-space: nowrap;
}

.nav-item a:hover {
  color: #eee;
  background: #222;
  border-left-color: var(--gold);
  border-bottom: none;
}

.nav-item a.current {
  color: var(--gold);
  background: #222;
  border-left-color: var(--gold);
}

/* ── Main content ────────────────────────────────── */

#content {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2.5rem 2.5rem;
}

/* ── Page title / toptitle ───────────────────────── */

div#toptitle {
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--gold);
}

div#toptitle h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--black);
  border: none;
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

div#subtitle {
  margin-top: 0.25rem;
  margin-bottom: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}

div#subtitle a {
  color: var(--gray-700);
  text-decoration: none;
}

div#subtitle a:hover { text-decoration: underline; }

/* ── Headings ────────────────────────────────────── */

h1, h2, h3 {
  color: var(--black);
  line-height: 1.3;
}

h1 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding: 0;
  border: none;
}

h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0.6rem;
  border-left: 3px solid var(--gold);
  border-bottom: none;
}

/* Reduce top margin when h2 follows toptitle */
div#toptitle + h2, div#toptitle + h3 { margin-top: 0.5rem; }

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.8rem;
  margin-bottom: 0.3rem;
  padding: 0;
  border: none;
}

h2 + h3 { padding-top: 0; }

/* ── Body text ───────────────────────────────────── */

p {
  margin-top: 0;
  margin-bottom: 0.7rem;
  padding: 0;
  line-height: 1.65;
}

a, a > tt {
  color: var(--link);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

em { font-style: italic; }
strong { font-weight: bold; }

/* ── Lists ───────────────────────────────────────── */

ul, ol, dl {
  margin-top: 0.2em;
  padding-top: 0;
  margin-bottom: 0.7em;
}

ul {
  list-style-position: outside;
  list-style-type: square;
}

ol {
  list-style-position: outside;
  list-style-type: decimal;
}

ol ol  { list-style-type: lower-alpha; }
ol ol ol { list-style-type: lower-roman; }

li p, dd p { margin-bottom: 0.3em; }
li ul, li ol { margin-top: -0.3em; }
p + ul, p + ol { margin-top: -0.5em; }

dt { margin-top: 0.5em; margin-bottom: 0; }
dl { margin-left: 20px; }
dd { color: #222; }
dd > *:first-child { margin-top: 0; }

/* ── Code ────────────────────────────────────────── */

tt {
  background: #ffffdd;
  font-size: 90%;
  font-family: monaco, monospace;
}

pre, tt { font-size: 90%; font-family: monaco, monospace; }
pre { padding: 0; margin: 0; }

/* ── Code / info blocks ──────────────────────────── */

p + div.codeblock { margin-top: -0.6em; }

div.codeblock, div.infoblock {
  margin-right: 0%;
  margin-top: 1.2em;
  margin-bottom: 1.3em;
}

div.blocktitle {
  font-weight: bold;
  color: var(--link);
  margin-top: 1.2em;
  margin-bottom: 0.1em;
}

div.blockcontent {
  border: 1px solid silver;
  padding: 0.3em 0.5em;
}

div.infoblock > div.blockcontent { background: #ffffee; }
div.codeblock  > div.blockcontent { background: #f6f6f6; }
div.infoblock p { margin-bottom: 0; }
div.infoblock li p, div.infoblock dd p { margin-bottom: 0.5em; }
div.infoblock p + p { margin-top: 0.8em; }
div.blockcontent p + ul, div.blockcontent p + ol { margin-top: 0.4em; }

/* ── Tables ──────────────────────────────────────── */

table {
  border: 2px solid black;
  border-collapse: collapse;
}

td {
  padding: 2px 0.5em;
  text-align: center;
  border: 1px solid gray;
}

table + table { margin-top: 1em; }
tr.heading { font-weight: bold; border-bottom: 2px solid black; }

table.imgtable, table.imgtable td {
  border: none;
  text-align: left;
  vertical-align: top; /* This ensures text aligns with the top of the image */
}

img { border: none; }
img.eq  { padding: 0 0.1em; margin: 0; }
img.eqwl { padding-left: 2em; padding-top: 0.6em; padding-bottom: 0.2em; margin: 0; }

/* ── Syntax highlighting ─────────────────────────── */

span.pycommand { color: #000070; }
span.statement  { color: #008800; }
span.builtin    { color: #000088; }
span.special    { color: #990000; }
span.operator   { color: #880000; }
span.error      { color: #aa0000; }
span.comment, span.comment > *,
span.string,  span.string  > * { color: #606060; }

/* ── Seminar / media grid ────────────────────────── */

.seminar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.seminar-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  background: #000;
  aspect-ratio: 3 / 2;
  transition: box-shadow 0.15s;
}

.seminar-item:hover {
  box-shadow: 0 5px 18px rgba(0,0,0,0.22);
}

.seminar-item a,
.seminar-item img,
.seminar-item iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

/* ── Gallery grid ────────────────────────────────── */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  text-align: center;
}

.gallery-item a {
  display: block;
  margin-bottom: 0.6rem;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.15s;
}

.gallery-item img:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.gallery-item iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.15s;
  border: none;
}

.gallery-item iframe:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.gallery-item p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.4;
}

/* ── Speaker grid (posters/headshots) ────────────── */

.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.speaker-item {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.15s;
}

.speaker-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.speaker-item a {
  display: block;
}

.speaker-item img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
}

.speaker-item iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
}

/* ── Organizers grid ─────────────────────────────── */

.organizers-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.organizer-item {
  text-align: center;
}

.organizer-item img {
  width: 120px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: block;
}

/* ── Footer ──────────────────────────────────────── */

div#footer {
  margin-top: 2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.72rem;
  color: #aaa;
}

div#footer a { color: #aaa; }
div#footer-text { float: left; padding-bottom: 8px; }

/* ── fwtitle (full-width title mode) ─────────────── */

#fwtitle { margin: 2px; }
#fwtitle #toptitle { padding-left: 0.5em; margin-bottom: 0.5em; }

/* ── Print ───────────────────────────────────────── */

@media print {
  #sidebar { display: none; }
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 900px) {
  #content { padding: 1.5rem; }
}

@media (max-width: 680px) {
  body { flex-direction: column; }
  #sidebar {
    w