/* ============================================================
   LVCG — custom minimal tech design system
   ============================================================ */

:root {
  --ink:        #0b1622;
  --ink-2:      #1b2c3a;
  --muted:      #5b6a77;
  --muted-2:    #8a97a2;
  --line:       #e5ebf0;
  --line-2:     #d3dde4;
  --bg:         #ffffff;
  --bg-soft:    #f6f9fb;
  --bg-soft-2:  #eef3f7;
  --primary:    #0e6e86;
  --primary-d:  #0a5064;
  --accent:     #17b7d4;
  --accent-soft:#e2f6fb;
  --ours-bg:    #eafaff;
  --shadow-sm:  0 1px 2px rgba(11, 22, 34, 0.04), 0 2px 8px rgba(11, 22, 34, 0.04);
  --shadow-md:  0 6px 30px rgba(11, 22, 34, 0.08);
  --radius:     14px;
  --radius-sm:  10px;
  --maxw:       1080px;
  --maxw-wide:  1240px;
  --nav-h:      64px;
  --font-head:  'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:  'Inter', 'Noto Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
sup { font-size: 0.62em; }
strong { color: var(--ink); font-weight: 600; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.wide { max-width: var(--maxw-wide); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw-wide); margin: 0 auto; height: 100%;
  padding: 0 24px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: 0.02em; display: flex; align-items: center; gap: 0.55rem; }
.nav-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--primary); background: var(--accent-soft); }
.nav-cta {
  padding: 8px 16px !important; border-radius: 999px !important;
  background: var(--ink) !important; color: #fff !important; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--primary) !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: .25s; }

/* ---------- Section scaffolding ---------- */
main { padding-top: var(--nav-h); }
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.tight { padding: 56px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-head); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.9rem;
}
.eyebrow .num {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--accent-soft); color: var(--primary); font-size: 0.72rem; letter-spacing: 0;
}
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin-top: 0.9rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 0 40px; text-align: center;
  background:
    radial-gradient(60% 90% at 50% -10%, var(--accent-soft) 0%, rgba(226,246,251,0) 60%),
    var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 70% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.5;
}
.hero .container { position: relative; z-index: 1; }
.venue-tag {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1.4rem;
  padding: 0.4rem 0.5rem 0.4rem 1rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--ink-2);
}
.venue-tag .poster-badge { background: var(--ink); color: #fff; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.72rem; letter-spacing: 0.06em; }
.hero-title { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 700; letter-spacing: -0.03em; background: linear-gradient(180deg, var(--ink) 30%, var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--ink-2); margin: 0.6rem auto 1.6rem; max-width: 720px; }
.authors { color: var(--ink-2); font-size: 1rem; max-width: 780px; margin: 0 auto; }
.authors .author-block { display: inline-block; white-space: nowrap; margin: 0 0.15rem; }
.affil { color: var(--muted); font-size: 0.9rem; margin-top: 0.8rem; }
.corr { color: var(--muted-2); font-size: 0.85rem; margin-top: 0.4rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.8rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); transition: .2s;
}
.btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); background: #fff; }

/* ---------- Teaser video ---------- */
.teaser { padding-top: 8px; }
.video-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-2); box-shadow: var(--shadow-md); background: #fff;
}
.video-frame video { width: 100%; display: block; background: #fff; }
.video-cap { text-align: center; color: var(--muted); font-size: 0.98rem; margin-top: 1.1rem; }

/* ---------- Abstract ---------- */
.prose { max-width: 780px; margin: 0 auto; color: var(--ink-2); font-size: 1.06rem; }
.prose.justify { text-align: justify; }

/* ---------- Generic cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card .kicker { font-family: var(--font-head); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* compare cards (observable vs source) */
.compare { align-items: stretch; }
.compare .card { display: flex; flex-direction: column; }
.card.is-source { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow-sm); }
.card.is-source .kicker { color: var(--primary); }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.2rem 0.6rem; border-radius: 999px; }
.pill.warn { background: #fdeeee; color: #b1483f; }
.pill.good { background: var(--accent-soft); color: var(--primary); }
.feat-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.feat-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.55rem; color: var(--ink-2); font-size: 0.96rem; }
.feat-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.feat-list.neg li::before { background: #d98a83; }

/* lift / project chip row */
.op-row { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin: 26px 0 0; }
.op-chip { display: inline-flex; align-items: center; gap: 0.6rem; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 0.55rem 1.1rem; box-shadow: var(--shadow-sm); font-weight: 600; color: var(--ink); }
.op-chip .tag { font-family: var(--font-head); color: var(--primary); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.op-chip .arrow { color: var(--accent); }

/* ---------- Formula ---------- */
.eqn {
  background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.1rem 0; overflow-x: auto;
}
.eqn .eqn-label { display: block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 0.4rem; font-family: var(--font-head); }
.mono { font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', monospace; }

/* ---------- Figures ---------- */
.figure { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.figure img { width: 100%; display: block; border-radius: 8px; }
.figure.plain { padding: 10px; }
.fig-title { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink); margin: 0.9rem 0 0.25rem; text-align: center; }
.fig-cap { color: var(--muted); font-size: 0.92rem; text-align: center; margin: 0.35rem 0 0.2rem; }

/* ---------- Stats highlight ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat .num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat .num sup { color: var(--accent); }
.stat .lbl { color: var(--muted); font-size: 0.82rem; margin-top: 0.4rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.result { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: #fff; }
table.result th, table.result td { padding: 0.72rem 1rem; text-align: center; border-bottom: 1px solid var(--line); }
table.result th { background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em; }
table.result th:first-child, table.result td:first-child { text-align: left; }
table.result tbody tr:last-child td { border-bottom: 0; }
table.result tr.ours td { background: var(--ours-bg); font-weight: 600; color: var(--ink); }
table.result td.best { color: var(--primary); font-weight: 700; }
.table-note { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 1rem; }
.table-note strong { color: var(--primary); }

/* ---------- Bibtex ---------- */
.bibtex { position: relative; background: var(--ink); color: #d7e3ea; border-radius: var(--radius); padding: 1.4rem 1.4rem; overflow-x: auto; }
.bibtex pre { margin: 0; font-family: ui-monospace, 'SF Mono', monospace; font-size: 0.82rem; line-height: 1.65; white-space: pre; }
.copy-btn { position: absolute; top: 0.8rem; right: 0.8rem; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; border-radius: 8px; padding: 0.35rem 0.75rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: .18s; }
.copy-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* ---------- Affiliation logos ---------- */
.logo-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 22px 44px; margin-top: 2.2rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
  max-width: 760px; margin-left: auto; margin-right: auto;
}
.logo-strip .logo {
  width: auto; display: block; object-fit: contain;
  opacity: 0.6; filter: grayscale(100%);
  transition: opacity .25s ease, filter .25s ease;
}
.logo-strip .logo:hover { opacity: 1; filter: none; }
/* per-logo optical balancing (different aspect ratios → similar visual weight) */
.logo-strip .logo-gu    { height: 30px; }
.logo-strip .logo-sh    { height: 46px; }
.logo-strip .logo-emory { height: 34px; }
.logo-strip .logo-icml  { height: 40px; }
@media (max-width: 768px) {
  .logo-strip { gap: 18px 30px; }
  .logo-strip .logo-gu    { height: 24px; }
  .logo-strip .logo-sh    { height: 38px; }
  .logo-strip .logo-emory { height: 27px; }
  .logo-strip .logo-icml  { height: 32px; }
}

/* ---------- Footer ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 44px 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
.footer a { color: var(--primary); }
.footer .sep { margin-top: 0.6rem; color: var(--muted-2); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid.cols-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 16px; box-shadow: var(--shadow-md);
    transform: translateY(-140%); transition: transform .28s ease; z-index: 90;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; border-radius: var(--radius-sm); }
  .nav-toggle { display: block; }
  .grid.cols-2, .grid.compare { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .authors .author-block { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
