:root{
  --bg: #f7f6f2;        /* dusky white */
  --card: #ffffff;
  --text: #121417;
  --muted: #5b6572;
  --line: #e7e3db;
  --shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  --radius: 14px;

  --accent: #2f80ed;
  --accent2: #1f8a70;

  /* new: header tint */
  --header: #f1efe8;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container{
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
}

.page{ padding: 0 0 56px; }

/* --- Top nav: slightly different tint so it reads like a header --- */
.topnav{
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(241,239,232,0.95); /* subtle warm tint (slightly darker than --bg) */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}
.topnav__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

/* Logo wordmark */
.logo{
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.logo__mark{ font-size: 22px; }
.logo__mark--alt{
  color: var(--accent2);
  margin-left: 1px;
}

/* Nav links */
.topnav__links{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.topnav__links a{
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.topnav__links a:hover{ color: var(--text); }

.topnav__actions{ display: flex; gap: 10px; }
@media (max-width: 860px){
  .topnav__links{ display: none; }
}

/* Icons */
.icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 16px;
}

/* Buttons */
.btn{
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.55);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.btn:hover{ transform: translateY(-1px); }
.btn--solid{
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31,138,112,0.18);
}
.btn--ghost{
  background: rgba(255,255,255,0.55);
}

/* Hero header */
.hero{ padding: 28px 0 10px; }
.hero__center{
  text-align: center;
  padding-top: 10px;
}
.hero__title{
  margin: 0 0 10px 0;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.10;
  letter-spacing: -0.035em;
}
.hero__authors{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.hero__authors a{
  color: #1f5fbf;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}
.hero__authors a:hover{ text-decoration: underline; }

.hero__affils{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.dot{ margin: 0 8px; color: #c2bdb3; }

/* Pills (icons, no emojis) */
.pill-row{
  margin: 16px 0 8px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.70);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}
.pill:hover{ transform: translateY(-1px); }

.hero__subtitle{
  margin: 14px auto 0;
  max-width: 86ch;
  color: var(--muted);
  font-size: 14px;
}

/* --- Figure 1: bigger, rounded, white mat so pure-white figure background blends nicely --- */
.hero-figure{
  margin: 18px auto 0;
  max-width: 1440px;
}
.hero-figure__mat{
  background: #ffffff;           /* the “mat” */
  border-radius: 18px;           /* rounded corners */
  padding: 4px;                 /* breathing room */
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
  border: 1px solid rgba(0,0,0,0.06);
}
.hero-figure img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;           /* soft edges on image */
}
.hero-figure__cap{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Info blocks under Fig 1 */
.info-blocks{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 960px){
  .info-blocks{ grid-template-columns: 1fr; }
}

/* Make the title look like a mini navbar/header inside the card */
.info-card{
  overflow: hidden;          /* so the header bar respects rounded corners */
  padding-top: 0;            /* header will provide its own padding */
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  /* background: rgba(255,255,255,0.72); */
  /* box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05); */
}

/* Header bar style */
.info-card__title{
  display: block;
  margin: 0 0 10px 0;
  padding: 10px 14px;

  background: rgba(241,239,232,0.92);              /* same family as topnav */
  border-bottom: 1px solid rgba(0,0,0,0.06);

  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.01em;
}

/* Put padding back for the content below the title */
.info-card__lead,
.info-list,
.callout,
.mini-steps{
  padding: 0 14px;
}

.info-card__lead{ margin-top: 6px; }

/* Accent card: slightly different header tint to match theme */
.info-card--accent .info-card__title{
  background: rgba(31,138,112,0.10);
  border-bottom-color: rgba(31,138,112,0.18);
}


.callout{
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.65);
  padding: 10px;
}
.callout--soft{
  background: rgba(31,138,112,0.08);
  border-color: rgba(31,138,112,0.18);
}
.callout--hard{
  background: rgba(138, 52, 31, 0.08);
  border-color: rgba(138, 52, 31, 0.18);
}
.callout__k{
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.callout__v{
  margin-top: 2px;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}

.info-list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.info-list li{ margin: 6px 0; }

/* mini steps inside Key Idea block */
.mini-steps{
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.mini-step{
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.mini-step span{
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: rgba(47,128,237,0.10);
  color: #1f5fbf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: 0 0 auto;
}
.mini-step b{ font-weight: 900; }
.mini-step div{ color: var(--muted); font-size: 13px; }
.mini-step div div{ color: var(--muted); }

/* Generic card + sections */
.card{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  padding: 16px;
  min-width: 10px;
}

.section{ margin-top: 26px; padding-top: 6px; }
.section h2{
  text-align: center;
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.center{ text-align: center; }
.muted{ color: var(--muted); }
.prose{ max-width: 92ch; margin: 0 auto; }

/* Grid2 */
.grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 960px){
  .grid2{ grid-template-columns: 1fr; }
}

/* Steps */
.steps{
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}
.steps li{
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.steps li span{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(31,138,112,0.12);
  color: var(--accent2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: 0 0 auto;
}

/* Code boxes */
.codebox{
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #ffffff; /* plain white to match site background */
  color: var(--text);
  padding: 12px 14px;
  overflow: auto;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  -moz-tab-size: 2;
  tab-size: 2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.codebox pre,
.codebox code{
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  white-space: pre;
}

/* optional language label if you add data-lang attribute to the container */
.codebox[data-lang]::before{
  content: attr(data-lang);
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.03);
  padding: 4px 8px;
  border-radius: 999px;
  pointer-events: none;
}

/* optional copy button styling if you include a button inside */
.codebox .copy-btn{
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.04);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
pre{ margin: 0; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Figure framing (method/results) */
.figure{ margin: 0; }
.figure figcaption{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.figure--framed .media-frame{
  width: 100%;
  height: 340px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
@media (max-width: 960px){
  .figure--framed .media-frame{ height: 340px; }
}
@media (max-width: 520px){
  .figure--framed .media-frame{ height: 260px; }
}
.figure--framed img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
}

/* Tabs */
.tabs{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tab{
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(241,239,232,0.85); /* slightly warm, more visible than pure white */
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 16px;
  color: var(--muted);
  transition: background .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.tab:hover{
  transform: translateY(-1px);
  background: rgba(31,138,112,0.06);
  color: var(--text);
}
.tab.active{
  color: #fff;
  background: var(--accent2);
  border-color: var(--accent2);
  box-shadow: 0 8px 24px rgba(31,138,112,0.18);
}
.tabpane{ display: none; }
.tabpane.active{ display: block; }

.sep{
  border: 0;
  height: 1px;
  background: rgba(0,0,0,0.10);
  margin: 18px 0;
}
.subhead{
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* BibTeX: code-like, not huge/dark */
.bib-card{ padding: 14px 16px; }
.bib-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.codeblock{
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fbfaf7;
  padding: 12px;
  overflow: auto;
  color: #1f2937; /* softer than pure black */
  font-size: 13px;
}

/* Footer */
.footer{ margin-top: 30px; }
