/* Base + variables (kept close to HDLM page vibe)
/* Light theme (default) */
:root {
  --bg:#f6f7fb;
  --panel:#ffffff;
  --text:#111318;
  --muted:#222222;
  --brand:#3da9ff;   /* blue */
  --brand-2:#ff7fa0; /* pink */
  --line:#e6e8ee;
  --maxw:1100px;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.08);
}

[data-theme="dark"] {
  --bg:#0b0c10;
  --panel:#121318;
  --text:#e8eaf0;
  --muted:#a6adbb;
  --brand:#7fd0ff;
  --brand-2:#ff8da1;
  --line:#22252e;
  --shadow:0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif}
img{max-width:100%;height:auto;border-radius:12px;box-shadow:var(--shadow)}
a{color:var(--brand);text-decoration:none}
a:hover{opacity:.9}
.container{width:100%;max-width:var(--maxw);margin:0 auto;padding:0 20px}
.mute{color:var(--muted)}

.site-header{
  position:sticky;top:0;z-index:10;
  background:rgba(11,12,16,.75);backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line)
}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px}
.brand{font-weight:800;letter-spacing:.5px}
.nav-links{display:flex;gap:18px;list-style:none;margin:0;padding:0}
.nav-links a{padding:8px 10px;border-radius:10px}
.nav-links a:hover{background:var(--panel);color:#fff}

/* .hero{
  display:grid;grid-template-columns:1.25fr .9fr;gap:28px;
  padding:48px 0 20px
} */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr; /* equal halves */
  align-items: center;            /* vertically align text and image */
  gap: 0px;
  padding: 0px 0;
  padding-bottom: 0px;
}
.hero h1{font-size:34px;line-height:1.15;margin:0 0 10px}
.hero img {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.authors,.affils,.venue{color:var(--muted);margin:4px 0}
.cta{display:flex;gap:12px;margin:18px 0 8px}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.section{padding:28px 0;border-top:1px solid var(--line)}
.section:first-of-type{border-top:none}
.section h2{font-size:26px;margin:0 0 14px}
.section h3{font-size:20px;margin:0 0 10px}
/* replace the old rule with this */
.section p{
  color: var(--text);     /* black in light theme, light text in dark theme */
  line-height: 1.65;
}

figure{margin:16px 0}
figcaption{color:var(--muted);font-size:14px;margin-top:8px}

.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:24px}
@media (max-width: 900px){ .hero{grid-template-columns:1fr} .grid-2{grid-template-columns:1fr} }

.citation pre{background:var(--panel);padding:16px;border-radius:12px;overflow:auto;border:1px solid var(--line)}

.site-footer{padding:28px 0;color:var(--muted)}

.metrics-table {
  width: 100%;
  table-layout: fixed;   /* forces consistent widths */
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.metrics-table th,
.metrics-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; /* ensures equal spacing */
}

.metrics-table thead th {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  text-align: center;
  border-bottom: none;
}

.metrics-table tbody tr:last-child td {
  border-bottom: none;
}

/* alignments per column */
.metrics-table th:first-child,
.metrics-table td:first-child {
  text-align: left;   /* Method */
}

.metrics-table th:not(:first-child),
.metrics-table td:not(:first-child) {
  text-align: right;  /* numeric cols */
}

/* existing base styles can stay the same, they read from the variables */
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif}

/* Header background needs translucency for both themes */
.site-header{
  position:sticky;top:0;z-index:10;
  background:color-mix(in oklab, var(--bg), transparent 25%);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line);
}

/* Gradient buttons (applies to all .btn as you asked) */
.btn{
  display:inline-block;padding:10px 16px;border-radius:12px;font-weight:600;color:#fff;
  background:linear-gradient(90deg,var(--brand),var(--brand-2));
  border:none;transition:transform .15s ease, opacity .15s ease
}
.btn:hover{transform:translateY(-2px);opacity:.9}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.theme-toggle span {
  display: inline-block;
  line-height: 1;        /* tighten emoji box */
}
.theme-toggle .sun{display:inline}
.theme-toggle .moon{display:none}
.theme-toggle.is-dark .sun{display:none}
.theme-toggle.is-dark .moon{display:inline}

/* Optional: make nav items and toggle live together on small screens */
.nav{display:flex;align-items:center;justify-content:space-between;height:64px}
.nav-links{display:flex;gap:18px;list-style:none;margin:0;padding:0}
@media (max-width: 720px){
  .nav{gap:10px}
  .nav-links{gap:10px}
}