/* ============================================================
   A Production-Oriented Framework for Evaluation of SFX Generation
   Project page styles
   ============================================================ */

:root {
  --ax:   #9366bc;  /* AudioX     */
  --aldm: #1e76b3;  /* AudioLDM   */
  --ts:   #d52627;  /* ThinkSound */
  --tf:   #2b9f2b;  /* T-Foley    */
  --a2sb: #e8820c;  /* A2SB       */

  --good: #2b9f2b;
  --mid:  #d99a00;
  --bad:  #d52627;

  --ink:  #1b1f24;
  --muted:#5b6470;
  --line: #e4e8ef;
  --tint: #f5f8ff;
  --accent:#3273dc;
}

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
}

.title, .subtitle, .publication-title { font-family: 'Google Sans', 'Noto Sans', sans-serif; }

/* ---------- Hero ---------- */
.publication-title { line-height: 1.18; }
.publication-authors { margin-top: .75rem; }
.author-block { white-space: nowrap; }
.author-block a { color: var(--accent); }

.conf-badges { margin-top: 1rem; }
.conf-badges .tag {
  font-size: .95rem; font-weight: 600; margin: .15rem;
  border: 1px solid var(--line);
}
.conf-badges .tag.is-main { background: #111; color: #fff; }
.conf-badges .tag.oral   { background: #ffeded; color: var(--bad); border-color: #f6c9c9; }

.publication-links { margin-top: 1.1rem; }
.publication-links .button { margin: .2rem; }

/* ---------- TL;DR ---------- */
.tldr {
  max-width: 980px; margin: 1.5rem auto 0;
  background: #f9f9fb; border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem; border-radius: 4px; font-size: 1.05rem;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.4rem; align-items: start;
  text-align: left;
}
.tldr-text, .tldr-table-col { min-width: 0; }
.tldr-table-col { order: -1; }

/* Table 5 — compact capability profile, mini version of the Results table */
.tldr-table-col { display: flex; flex-direction: column; gap: .5rem; }
.mini-cap { width: auto; border-collapse: collapse; font-size: .72rem; background: #fff; margin: 0 auto; }
.mini-cap th, .mini-cap td { padding: .22rem .32rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mini-cap thead th { font-weight: 700; font-size: .66rem; }
.mini-cap tbody th { text-align: left; font-weight: 600; color: var(--ink); font-size: .68rem; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.dot-good { background: var(--good); }
.dot-mid  { background: var(--mid); }
.dot-bad  { background: var(--bad); }
.mini-cap-legend {
  display: flex; flex-wrap: wrap; gap: .15rem .7rem; justify-content: center;
  font-size: .68rem; color: var(--muted); align-items: center;
}
.mini-cap-legend .dot { margin-right: .3rem; vertical-align: middle; }
.mini-cap-caption { text-align: center; margin-top: 0; }

@media (max-width: 768px) {
  .tldr { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section-title {
  border-bottom: 2px solid var(--line); padding-bottom: .35rem; margin-bottom: 1.4rem;
}
.anchor { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.box.soft {
  border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.05);
  border-radius: 10px; height: 100%;
}
.figure-card { text-align: center; }
.figure-card img { border-radius: 6px; }
.fig-caption { color: var(--muted); font-size: .85rem; margin-top: .6rem; line-height: 1.45; }

.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: .92em; }

/* ---------- Requirement chips ---------- */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: .75rem; }
.req {
  border: 1px solid var(--line); border-radius: 8px; padding: .7rem .85rem; background: #fff;
}
.req .rid {
  display: inline-block; font-weight: 700; color: #fff; background: var(--accent);
  border-radius: 5px; padding: 0 .45rem; margin-right: .4rem; font-size: .82rem;
}
.req .rname { font-weight: 600; }
.req p { font-size: .85rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Baseline cards ---------- */
.baseline {
  border-left: 5px solid var(--line); border-radius: 8px; background: #fff;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: .9rem 1rem; height: 100%;
}
.baseline h4 { font-weight: 700; margin-bottom: .15rem; font-family: 'Google Sans', sans-serif; }
.baseline .venue { font-size: .78rem; color: var(--muted); font-weight: 600; }
.baseline p { font-size: .87rem; color: #3a414b; margin-top: .4rem; }
.baseline.audiox   { border-left-color: var(--ax); }
.baseline.audioldm { border-left-color: var(--aldm); }
.baseline.thinksound{ border-left-color: var(--ts); }
.baseline.tfoley   { border-left-color: var(--tf); }
.baseline.a2sb     { border-left-color: var(--a2sb); }
.m-audiox{color:var(--ax)} .m-audioldm{color:var(--aldm)} .m-thinksound{color:var(--ts)}
.m-tfoley{color:var(--tf)} .m-a2sb{color:var(--a2sb)}

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff;
}
table.data th, table.data td { padding: .45rem .6rem; text-align: center; border-bottom: 1px solid var(--line); }
table.data th { background: #f3f5f9; font-weight: 600; }
table.data td.name, table.data th.name { text-align: left; font-weight: 600; }
table.data tr.sep td { background: #fafbfd; font-style: italic; color: var(--muted); text-align: left; font-size: .82rem; }
table.data .best { font-weight: 700; }
table.data .second { text-decoration: underline; }
.cap-good { background: rgba(43,159,43,.14); color: #1f6b1f; }
.cap-mid  { background: rgba(217,154,0,.16); color: #8a6200; }
.cap-bad  { background: rgba(213,38,39,.13); color: #9a1f1f; }
.cap-cell { text-align: left; font-size: .8rem; }
.tbl-note { font-size: .8rem; color: var(--muted); margin-top: .5rem; }

/* ---------- TOC / quick links ---------- */
.toc { background: var(--tint); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; }
.toc ul { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: .35rem .9rem; }
.toc a { font-weight: 600; color: var(--accent); }
.toc a::before { content: "→ "; color: var(--muted); }

/* ---------- Audio demo blocks ---------- */
.audio-example {
  margin-bottom: 2rem; padding: 1.1rem 1rem; border-radius: 10px; background: var(--tint);
  border: 1px solid var(--line);
}
.audio-example .prompt { font-size: 1.02rem; margin-bottom: .9rem; }
.audio-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: .8rem; }
.audio-row + .audio-row { margin-top: .8rem; }

/* ATA and Targeted editing: lock every row to a 3-column template (full row
   width / 3), instead of auto-fit sizing columns from each row's own item
   count. A 3-card row fills it exactly; the 2-card row (Original/Target)
   gets the same per-card width as the 3-card rows, just with one column
   left empty, instead of stretching to fill the row on its own. */
.audio-example[data-demo="ata"] .audio-row,
.audio-example[data-demo="editing"] .audio-row {
  grid-template-columns: repeat(3, 1fr);
}
.audio-sample { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .4rem; }
.audio-sample .lab { font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.audio-sample audio { width: 100%; height: 36px; }
.swatch { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:5px; vertical-align: middle; }

/* Per-sample visualizations (mel-spectrogram / energy curve) inside an audio card */
.viz-stack { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .5rem; }
.viz-thumb { width: 100%; display: block; border-radius: 5px; border: 1px solid var(--line); }

/* SFX morphing: one row per method, sweeping across noise level (sigma) */
.morph-row { margin-top: .9rem; }
.morph-row-label { font-weight: 700; font-size: .85rem; margin-bottom: .5rem; color: var(--ink); }
.morph-viz {
  width: 100%; max-width: 640px; display: block; margin: 0 auto 1rem;
  border-radius: 6px; border: 1px solid var(--line);
}

/* ---------- Equations ---------- */
.eqblock { background:#fff; border:1px solid var(--line); border-radius:8px; padding: .4rem 1rem; margin:.8rem 0; overflow-x:auto; }
.metric-def { margin-bottom: 1rem; }
.metric-def .mh { font-weight: 700; }

/* ---------- BibTeX ---------- */
pre.bibtex { background:#1b1f24; color:#e6e6e6; border-radius:8px; padding:1rem 1.2rem; overflow-x:auto; font-size:.85rem; }

/* ---------- Footer ---------- */
.foot { background:#fafbfd; border-top:1px solid var(--line); padding:2rem 1rem; color:var(--muted); font-size:.85rem; }

/* ---------- Navbar ---------- */
.sticky-nav { border-bottom:1px solid var(--line); }
.sticky-nav .navbar-item { font-weight:600; }

/* ---------- Gradient outline (transparent fill, 5-color border ring) ----------
   Fixed color order everywhere: AudioX -> AudioLDM -> ThinkSound -> T-Foley -> A2SB
   Uses a masked ::before overlay so the interior is genuinely unpainted (not just
   layered with a "transparent" background, which would only reveal whatever
   background sits underneath it rather than the page itself). */
.gradient-outline {
  position: relative;
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: .35rem 1rem;
  background: none;
}
.gradient-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(90deg, var(--ax), var(--aldm), var(--ts), var(--tf), var(--a2sb));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  transition: filter .15s ease;
}
.gradient-outline:hover::before,
.gradient-outline:focus-visible::before { filter: brightness(1.18); }

/* Restore each element's normal internal layout (Bulma uses flex for these) */
.navbar-item.gradient-outline { display: flex; align-items: center; }
.button.gradient-outline { display: inline-flex; align-items: center; }

@media (max-width: 768px){
  .author-block { white-space: normal; }
}
