/* ── Accent color ─────────────────────────────────────────── */
:root { --accent: #d4872a; --accent-faint: rgba(212, 135, 42, 0.15); }

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  background: #f5f4f0;
  color: rgba(20, 20, 20, 0.88);
}

/* ── Animated background canvas ──────────────────────────── */
#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ── Page layout ─────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

/* ── Site header (name, outside any cell) ────────────────── */
.site-header {
  text-align: center;
  margin-bottom: 64px;
}

.site-photo {
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 22px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
  border: 2px solid rgba(255,255,255,0.7);
}

.site-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: rgba(15, 15, 15, 0.88);
}

.site-tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(40, 40, 40, 0.45);
  margin: 0;
}

/* ── Cells column ────────────────────────────────────────── */
.cells {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Frosted glass cell ──────────────────────────────────── */
.cell {
  padding: 36px 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(1.5px) saturate(150%);
  -webkit-backdrop-filter: blur(1.5px) saturate(150%);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

/* ── Cell title ──────────────────────────────────────────── */
.cell-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.10);
  color: rgba(15, 15, 15, 0.85);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.cell-title:hover {
  color: var(--accent);
}

.cell-title::after {
  content: '›';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.3s ease;
  transform: rotate(90deg);
}

.cell--collapsed .cell-title::after {
  transform: rotate(0deg);
}

/* ── Collapsible body ────────────────────────────────────── */
.cell-body-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s ease;
}

.cell--collapsed .cell-body-wrap {
  grid-template-rows: 0fr;
}

.cell-body-inner {
  overflow: hidden;
}

.cell-body {
  padding-top: 24px;
}

/* ── Markdown prose inside cells ─────────────────────────── */
.cell-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(25, 25, 25, 0.82);
}

.cell-body p { margin: 0 0 1em; }
.cell-body p:last-child { margin-bottom: 0; }

.cell-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 2em 0 0.6em;
  color: rgba(15,15,15,0.55);
}

.cell-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
  margin: 1.4em 0 0.4em;
}

/* Tables */
.cell-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5em 0 1.4em;
  font-size: 0.9rem;
}
.cell-body th {
  text-align: left;
  font-weight: 500;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.55);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cell-body td {
  padding: 7px 12px 7px 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.cell-body tr:last-child td { border-bottom: none; }

/* Lists */
.cell-body ul, .cell-body ol {
  margin: 0.4em 0 1em;
  padding-left: 1.4em;
}
.cell-body li { margin-bottom: 0.45em; }

/* Horizontal rules */
.cell-body hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 1.8em 0;
}

/* Links */
.cell-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 135, 42, 0.3);
  transition: border-color 0.2s;
}
.cell-body a:hover {
  border-color: var(--accent);
}

/* Strong */
.cell-body strong { font-weight: 500; }

/* Highlighted note (e.g. ICLR ranking) */
.cell-body .highlight-note {
  display: inline-block;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(90, 60, 10, 0.85);
  background: rgba(255, 210, 100, 0.22);
  border: 1px solid rgba(200, 160, 40, 0.3);
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Advisor cards ───────────────────────────────────────── */
.advisor-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.advisor-card {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(212, 135, 42, 0.3);
  background: rgba(212, 135, 42, 0.07);
  flex: 1 1 180px;
}

.advisor-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(15, 15, 15, 0.88);
}

.advisor-meta {
  font-size: 0.75rem;
  color: rgba(40, 40, 40, 0.5);
  margin-top: 2px;
}

/* Em */
.cell-body em { font-style: italic; }

/* Loading state */
.cell-body.loading {
  opacity: 0.4;
  font-style: italic;
}

/* ── Links cell ──────────────────────────────────────────── */
.cell-body ul li {
  list-style: none;
  padding-left: 0;
}
/* override only for links cell — handled by specificity via .cell--links if needed */
