/* ═══════════════════════════════════════════
   ING Lab — main.css
   Minimal academic theme, single file
   ═══════════════════════════════════════════ */

/* ─── Reset ───────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Base ────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
               "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
  color: #1a1a1a;
  background: #ffffff;
}

/* ─── Navigation ──────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 200;
}

.nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: #2563eb;
}

.nav-menu {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.1rem;
}

.nav-menu a {
  display: block;
  padding: 0.3rem 0.6rem;
  font-size: 0.875rem;
  color: #6b6b6b;
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: #111;
  background: #f3f4f6;
}

/* ─── Page content wrapper ────────────────── */
.page-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ─── Headings ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: #111;
  margin-top: 2.2rem;
  margin-bottom: 0.65rem;
}

h1 { font-size: 1.75rem; margin-top: 0; }
h2 { font-size: 1.3rem;  border-bottom: 1px solid #e5e7eb; padding-bottom: 0.35rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; font-weight: 600; color: #374151; }
h5 { font-size: 0.9rem;  font-weight: 600; color: #6b6b6b; }

/* Used in existing pages: <h2 class="hr-bottom"> */
h2.hr-bottom,
h3.hr-bottom {
  border-bottom: 2px solid #111;
  padding-bottom: 0.35rem;
}

/* ─── Paragraphs ──────────────────────────── */
p {
  margin-bottom: 1rem;
}

/* ─── Links ───────────────────────────────── */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Pill-style badges: *[PDF](...)* renders as <em><a>PDF</a></em> */
em > a {
  font-style: normal;
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.2em 0.55em;
  border-radius: 3px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  text-decoration: none;
  vertical-align: middle;
  margin: 0 0.1em;
}

em > a:hover {
  background: #e5e7eb;
  color: #111;
  text-decoration: none;
}

/* ─── Lists ───────────────────────────────── */
ul, ol {
  margin: 0.5rem 0 1rem 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

li p {
  margin-bottom: 0.25rem;
}

/* Nested list items (members page) */
li li {
  margin-bottom: 0.15rem;
}

/* ─── Tables ──────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.5rem;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

/* Restore for tables that don't need scroll */
@supports (display: table) {
  table {
    display: table;
  }
}

th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e5e7eb;
}

thead th {
  background: #f9fafb;
  font-weight: 600;
  border-bottom: 2px solid #d1d5db;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Resources page: borderless description tables */
table tbody tr:last-child td {
  border-bottom: none;
}

/* ─── Images ──────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
}

/* ─── Code ────────────────────────────────── */
code, kbd {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
  font-size: 0.875em;
  background: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

/* ─── Blockquote ──────────────────────────── */
blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-left: 3px solid #d1d5db;
  color: #6b6b6b;
  font-size: 0.95rem;
}

blockquote p { margin-bottom: 0; }

/* ─── Horizontal rule ─────────────────────── */
hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* ─── Strong & emphasis ───────────────────── */
strong, b {
  font-weight: 700;
  color: #111;
}

/* ─── Footer ──────────────────────────────── */
.site-footer {
  border-top: 1px solid #e5e7eb;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: #9ca3af;
}

.site-footer a {
  color: #9ca3af;
  text-decoration: none;
}

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

/* ─── Responsive ──────────────────────────── */
@media (max-width: 640px) {

  /* Nav: allow wrapping on small screens */
  .nav-inner {
    height: auto;
    min-height: 52px;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  .nav-menu a {
    padding: 0.2rem 0.45rem;
    font-size: 0.8rem;
  }

  .page-content {
    padding: 1.5rem 1rem 3rem;
  }

  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 1rem; }

  /* Profile photo: un-float and center on mobile */
  img[style*="float"] {
    float: none !important;
    display: block !important;
    margin: 0 auto 1.5rem !important;
    width: 150px !important;
    max-width: 150px !important;
  }

  table {
    font-size: 0.82rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  th, td {
    padding: 0.35rem 0.5rem;
  }
}
