/* ============================================
   Academic Project — Shared Design System
   Mirrors the tokens & rhythm of /index.html
   ============================================ */

@font-face {
  font-family: 'InterVariable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'InterVariable';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/InterVariable-Italic.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Medium.woff2') format('woff2');
}

:root {
  --bg-primary: #fbfbf9;
  --bg-secondary: #f2f1ec;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;

  --border-subtle: #e8e6df;
  --border-medium: #d6d3c8;
  --border-accent: #18181b;

  --text-primary: #111113;
  --text-secondary: #3a3a3f;
  --text-muted: #71717a;

  --accent: #2C5FD1;
  --accent-hover: #244EA8;
  --accent-light: rgba(44, 95, 209, 0.08);

  --cornell-red: #b31b1b;

  --content-width: min(94%, 960px);
  --content-width-wide: min(94%, 1120px);

  --font-heading: 'InterVariable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'InterVariable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(15, 15, 20, 0.05), 0 1px 2px rgba(15, 15, 20, 0.03);
  --shadow-md: 0 4px 14px -2px rgba(15, 15, 20, 0.06), 0 2px 6px -1px rgba(15, 15, 20, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(15, 15, 20, 0.12);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-primary: #0e0e10;
  --bg-secondary: #18181b;
  --bg-card: #131316;
  --bg-elevated: #1a1a1e;

  --border-subtle: #26262b;
  --border-medium: #34343a;
  --border-accent: #fafafa;

  --text-primary: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #8b8b93;

  --accent: #7aa2f7;
  --accent-hover: #a8c0ff;
  --accent-light: rgba(122, 162, 247, 0.12);

  --cornell-red: #ff6b6b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg-primary: #0e0e10;
    --bg-secondary: #18181b;
    --bg-card: #131316;
    --bg-elevated: #1a1a1e;
    --border-subtle: #26262b;
    --border-medium: #34343a;
    --border-accent: #fafafa;
    --text-primary: #f4f4f5;
    --text-secondary: #d4d4d8;
    --text-muted: #8b8b93;
    --accent: #7aa2f7;
    --accent-hover: #a8c0ff;
    --accent-light: rgba(122, 162, 247, 0.12);
    --cornell-red: #ff6b6b;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover, a:focus { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--content-width); margin: 0 auto; padding: 0 1.25rem; }
.container--wide { max-width: var(--content-width-wide); }

.section { padding: 3.5rem 0 1.5rem; }

.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================
   TOP CONTROLS (theme + ⋯ dropdown)
   ============================================ */
.top-controls {
  position: fixed;
  top: 1.2rem; right: 1.2rem;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.top-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1;
  position: relative;
}
.top-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.theme-toggle .theme-icon { display: none; font-size: 0.95rem; }
:root[data-theme="light"]  .theme-toggle .theme-icon--light,
:root[data-theme="dark"]   .theme-toggle .theme-icon--dark,
:root[data-theme="system"] .theme-toggle .theme-icon--system { display: inline; }

/* Nav dropdown (anchored to ⋯ button) */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-dropdown--open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }

.nav-dropdown__link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.nav-dropdown__link:hover { background: var(--accent-light); color: var(--accent); }
.nav-dropdown__link--active { color: var(--accent); background: var(--accent-light); }

.nav-dropdown__divider { height: 1px; background: var(--border-subtle); margin: 0.3rem 0.5rem; }

.nav-dropdown__hint {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  border: none; background: none;
  font-family: var(--font-body);
  width: 100%; text-align: left;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.nav-dropdown__hint:hover { background: var(--accent-light); color: var(--accent); }
.nav-dropdown__hint kbd {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ============================================
   LEFT RAIL (desktop ≥ 1100px)
   ============================================ */
.rail {
  position: fixed;
  top: 50%; left: 1.75rem;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.rail__brand {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  padding: 0.2rem 0.25rem;
  max-width: 140px;
  line-height: 1.2;
}

.rail__item {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.5rem 0.35rem 0.25rem;
  border-radius: 9999px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.rail__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-medium);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.rail__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition: max-width 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.2s ease,
              transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.rail:hover .rail__label,
.rail__item--active .rail__label {
  max-width: 140px;
  opacity: 1;
  transform: translateX(0);
}

.rail__item:hover { color: var(--text-primary); }
.rail__item:hover .rail__dot { background: var(--text-secondary); transform: scale(1.2); }

.rail__item--active { color: var(--accent); }
.rail__item--active .rail__dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  transform: scale(1.1);
}

.rail__sep { width: 1px; height: 18px; background: var(--border-subtle); margin: 0.35rem 0 0.35rem 2px; }

@media (max-width: 1100px) { .rail { display: none; } }

/* ============================================
   BOTTOM BAR (mobile only, ≤ 720px)
   ============================================ */
.bottom-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom));
}

.bottom-bar__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 0.25rem;
  max-width: 480px;
  margin: 0 auto;
}

.bottom-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.25rem 0.35rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  text-decoration: none;
  border: none; background: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.bottom-bar__icon { font-size: 1.05rem; line-height: 1; }
.bottom-bar__item:hover { color: var(--text-primary); background: var(--bg-secondary); }
.bottom-bar__item--active { color: var(--accent); }

@media (max-width: 720px) {
  .bottom-bar { display: block; }
  body { padding-bottom: 64px; }
}

/* ============================================
   COMMAND PALETTE (Cmd/Ctrl + K)
   ============================================ */
.cmd-palette-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cmd-palette-overlay--open { opacity: 1; pointer-events: all; }

.cmd-palette {
  width: min(92vw, 560px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.cmd-palette-overlay--open .cmd-palette { transform: translateY(0) scale(1); }

.cmd-palette__input-wrap {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-palette__icon { font-size: 1rem; color: var(--text-muted); flex-shrink: 0; }

.cmd-palette__input {
  flex: 1;
  border: none; background: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
}
.cmd-palette__input::placeholder { color: var(--text-muted); }

.cmd-palette__kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.cmd-palette__results { max-height: 360px; overflow-y: auto; padding: 0.4rem; }

.cmd-palette__group-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem 0.3rem;
}

.cmd-palette__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s ease;
  text-decoration: none;
  color: inherit;
}
.cmd-palette__item:hover,
.cmd-palette__item--active { background: var(--accent-light); }

.cmd-palette__item-icon { font-size: 0.85rem; flex-shrink: 0; width: 1.4rem; text-align: center; color: var(--text-muted); }
.cmd-palette__item-text { flex: 1; min-width: 0; }
.cmd-palette__item-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmd-palette__item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cmd-palette__empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 4.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero__eyebrow { margin-bottom: 0.9rem; }

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.hero__title em { font-style: normal; font-weight: 600; color: var(--text-primary); }

.hero__tagline {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  max-width: 720px;
}

.hero__mission {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero__meta span + span::before { content: '·'; margin-right: 0.6rem; color: var(--border-medium); }

/* ============================================
   FEATURED WORKS
   ============================================ */
.featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.feat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-medium); }

.feat-card__media {
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  overflow: hidden;
}
.feat-card__media img,
.feat-card__media video { width: 100%; height: 100%; object-fit: cover; }

.feat-card__body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }

.feat-card__venue {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
}

.feat-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.feat-card__title a { color: inherit; }
.feat-card__title a:hover { color: var(--accent); }

.feat-card__summary {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.feat-card__links {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: auto; padding-top: 0.5rem;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.pill-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }

/* ============================================
   NEWS
   ============================================ */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  overflow: hidden;
}

.news-item {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--bg-secondary); }

.news-item__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
  display: block;
  text-transform: uppercase;
}

.news-item__body {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.news-item__body p { margin: 0; }
.news-item__body p + p { margin-top: 0.4rem; }
.news-item__body a { color: var(--accent); font-weight: 500; }
.news-item__body strong { color: var(--text-primary); font-weight: 600; }

/* ============================================
   SEARCH + FILTERS
   ============================================ */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin: 1rem 0 1.25rem;
}

.search {
  flex: 1; min-width: 220px;
  position: relative;
}

.search__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem 0.6rem 2.2rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search::before {
  content: '';
  position: absolute;
  top: 50%; left: 0.8rem;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border: 1.8px solid var(--text-muted);
  border-radius: 50%;
  pointer-events: none;
}
.search::after {
  content: '';
  position: absolute;
  top: 50%; left: 1.55rem;
  width: 8px; height: 1.8px;
  background: var(--text-muted);
  transform: rotate(45deg) translateY(-50%);
  transform-origin: left;
  pointer-events: none;
}

.filters {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}

.filter-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  transition: all 0.15s ease;
}
.filter-tag:hover { color: var(--text-primary); border-color: var(--border-medium); }
.filter-tag--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================
   PAPER LIST (ledger style)
   ============================================ */
.paper-list { margin-top: 0.5rem; }

.paper {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  transition: opacity 0.3s ease, max-height 0.4s ease, padding 0.3s ease;
  max-height: 1000px;
  overflow: hidden;
}
.paper:last-child { border-bottom: 1px solid var(--border-subtle); }

.paper--hidden {
  opacity: 0; max-height: 0;
  padding-top: 0; padding-bottom: 0;
  border-color: transparent;
  pointer-events: none;
}

.paper__meta {
  display: flex; flex-direction: column; gap: 0.2rem;
  font-family: var(--font-mono);
  padding-top: 0.2rem;
}
.paper__venue-acronym { color: var(--text-primary); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.02em; }
.paper__year { color: var(--text-muted); font-size: 0.78rem; }

.paper__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.paper__title a { color: inherit; }
.paper__title a:hover { color: var(--accent); }

.paper__authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}
.paper__authors .me { color: var(--text-primary); font-weight: 600; }

.paper__summary {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.paper__links {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
}

@media (max-width: 600px) {
  .paper { grid-template-columns: 1fr; row-gap: 0.5rem; }
}

/* ============================================
   PEOPLE
   ============================================ */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem 1.25rem;
  margin-top: 1.25rem;
}

.person {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 0.55rem;
  transition: opacity 0.3s ease;
}
.person--hidden { display: none; }

.person__photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }

.person__name {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.person__name a { color: inherit; }
.person__name a:hover { color: var(--accent); }

.person__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.person__links {
  display: flex; gap: 0.45rem; margin-top: 0.15rem;
}
.person__links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.person__links a:hover { color: var(--accent); }

/* ============================================
   TEAMS
   ============================================ */
.team-block + .team-block { margin-top: 2.5rem; }
.team-block--hidden { display: none; }

.team-block__head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.team-block__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.team-block__lead {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.team-block__desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-bottom: 1rem;
  max-width: 760px;
}

/* ============================================
   PAPER DETAIL PAGE
   ============================================ */
.paper-hero {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.paper-hero__venue { margin-bottom: 0.8rem; }
.paper-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}
.paper-hero__authors {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.paper-hero__authors a { color: var(--text-primary); border-bottom: 1px dashed var(--border-medium); }
.paper-hero__authors a:hover { color: var(--accent); border-color: var(--accent); }
.paper-hero__affil {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.paper-hero__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}
.btn:hover { background: var(--bg-secondary); border-color: var(--border-medium); color: var(--text-primary); }
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); color: #fff; border-color: var(--accent-hover); }

.media-frame {
  margin-top: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.media-frame img, .media-frame video, .media-frame iframe {
  width: 100%; height: auto; display: block;
}
.media-frame iframe { aspect-ratio: 16/9; border: 0; }
.media-frame--plain {
  background: var(--bg-card);
}

.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 720px;
}
.prose p { margin-bottom: 1rem; }
.prose h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}
.prose h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

/* Bibtex */
.bibtex {
  margin-top: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre;
  overflow-x: auto;
}

.bibtex-wrap { position: relative; }
.bibtex-wrap .copy-btn {
  position: absolute; top: 0.6rem; right: 0.6rem;
}

/* ============================================
   BIBTEX TOAST
   ============================================ */
.bibtex-toast {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 200;
  width: min(420px, calc(100vw - 2.5rem));
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.bibtex-toast--visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.bibtex-toast__header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.bibtex-toast__check { color: var(--accent); font-weight: 700; }
.bibtex-toast__title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.bibtex-toast__close {
  background: none; border: 0;
  color: var(--text-muted);
  font-size: 1.1rem; line-height: 1;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.bibtex-toast__close:hover { color: var(--text-primary); background: var(--bg-card); }

.bibtex-toast__body {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary);
  padding: 0.75rem 0.9rem;
  max-height: 240px;
  overflow: auto;
  white-space: pre;
}

.bibtex-toast__progress {
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(1);
}
.bibtex-toast--counting .bibtex-toast__progress {
  transform: scaleX(0);
  transition: transform linear;
}

@media (max-width: 640px) {
  .bibtex-toast { right: 0.75rem; left: 0.75rem; width: auto; bottom: 0.75rem; }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ============================================
   RELIANCE project page
   ============================================ */
.reliance-hero {
  padding-top: 4.5rem;
}

.reliance-hero__figure {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.reliance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.reliance-grid--intro {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.reliance-prose {
  max-width: none;
}

.stat-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-card {
  min-height: 146px;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.stat-card span {
  display: block;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.section--tight {
  padding-top: 2.5rem;
}

.figure-grid {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}

.figure-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.figure-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.figure-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
  padding: 0.7rem;
}

.figure-card figcaption {
  min-height: 58px;
  padding: 0.8rem 0.9rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
}

.takeaway-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.takeaway-band > div {
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.takeaway-band h3 {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.takeaway-band p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.metric-table {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.metric-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.metric-table div:last-child {
  border-bottom: 0;
}

.metric-table span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.35;
}

.metric-table strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .reliance-grid,
  .reliance-grid--intro {
    grid-template-columns: 1fr;
  }

  .figure-grid--two,
  .figure-grid--three,
  .takeaway-band {
    grid-template-columns: 1fr;
  }

  .stat-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .stat-panel {
    grid-template-columns: 1fr;
  }

  .paper-hero__title {
    font-size: 1.55rem;
  }
}
