:root {
  --page-ink: #171a22;
  --page-muted: #606775;
  --page-line: #e7e9ee;
  --page-soft: #f6f7f9;
  --accent-a: #6d5ce7;
  --accent-b: #19a1d8;
  --accent-rgb: 109, 92, 231;
}

body[data-project="gs3lam"] { --accent-a: #0b9477; --accent-b: #2d83e8; --accent-rgb: 11, 148, 119; }
body[data-project="neaf"] { --accent-a: #7d4ed8; --accent-b: #e24d82; --accent-rgb: 125, 78, 216; }
body[data-project="raysup"] { --accent-a: #654de5; --accent-b: #12a7cb; --accent-rgb: 101, 77, 229; }
body[data-project="realvlg"] { --accent-a: #e23d5f; --accent-b: #eb842e; --accent-rgb: 226, 61, 95; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { padding-top: 4rem; color: var(--page-ink); background: #fff; font-family: "Noto Sans", system-ui, sans-serif; overflow-x: hidden; }
body::before { content: ""; position: fixed; z-index: 1000; top: 0; left: 0; width: var(--scroll-progress, 0%); height: 3px; background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); box-shadow: 0 0 10px rgba(var(--accent-rgb), .45); }
.title, h1, h2, h3 { font-family: "Google Sans", "Noto Sans", sans-serif; letter-spacing: -.025em; }

/* Navigation */
.navbar { position: fixed; z-index: 40; top: 0; right: 0; left: 0; min-height: 4rem; border-bottom: 1px solid rgba(25,29,39,.07); background: rgba(255,255,255,.86); backdrop-filter: blur(16px); transition: box-shadow .25s ease, background .25s ease; }
.navbar.is-scrolled { background: rgba(255,255,255,.96); box-shadow: 0 10px 30px rgba(22,27,39,.08); }
.navbar-menu, .navbar-dropdown { background: transparent; }
.navbar-item, .navbar-link { color: #343946; font-weight: 650; }
.page-nav-item { font-size: .88rem; letter-spacing: -.01em; }
.navbar-item:hover, .navbar-link:hover { color: var(--accent-a) !important; background: transparent !important; }
.navbar-dropdown { overflow: hidden; border: 1px solid var(--page-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(22,27,39,.12); background: rgba(255,255,255,.98); }
.navbar .icon { width: 2rem; height: 2rem; border-radius: 9px; background: var(--page-soft); }
.project-nav .navbar-brand { flex-shrink: 0; }
.project-nav .navbar-end { align-items: stretch; }
.project-nav .home-link .icon { display: grid; place-items: center; transition: color .2s ease, background .2s ease; }
.project-nav .home-link:hover .icon { color: #fff; background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); }
.brand-mark { font-family: "Google Sans", "Noto Sans", sans-serif; font-weight: 800 !important; letter-spacing: -.03em; }
.brand-mark > span { display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; margin-right: .55rem; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); }
.project-nav .research-toggle { height: 100%; border: 0; color: #343946; cursor: pointer; font: inherit; font-weight: 650; background: transparent; }
.project-nav .navbar-burger { border: 0; background: transparent; }

/* Paper header */
body > .hero:first-of-type { position: relative; overflow: hidden; background: radial-gradient(circle at 15% 0%, rgba(var(--accent-rgb), .15), transparent 30%), radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--accent-b) 15%, transparent), transparent 30%), linear-gradient(180deg, #fff, #fafbfc); }
body > .hero:first-of-type::after { content: ""; position: absolute; right: -8rem; bottom: -13rem; width: 30rem; height: 30rem; border: 1px solid rgba(var(--accent-rgb), .13); border-radius: 50%; box-shadow: 0 0 0 60px rgba(var(--accent-rgb), .035), 0 0 0 120px rgba(var(--accent-rgb), .025); pointer-events: none; }
body > .hero:first-of-type .hero-body { position: relative; z-index: 1; padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.publication-title { max-width: 1100px; margin: 0 auto 1.4rem !important; font-size: clamp(2.25rem, 5.15vw, 4.4rem) !important; line-height: 1.06 !important; text-wrap: balance; }
.publication-title::first-letter { color: var(--accent-a); }
.publication-authors { max-width: 1000px; margin: .2rem auto; color: var(--page-muted); line-height: 1.9; }
.publication-authors a { color: var(--page-ink) !important; border-bottom: 1px solid rgba(var(--accent-rgb), .42); transition: color .2s ease; }
.publication-authors a:hover { color: var(--accent-a) !important; text-decoration: none; }
.author-block { margin: 0 .18rem; }
.publication-authors b { display: inline-flex; margin-top: .7rem; padding: .38rem .8rem; border: 1px solid rgba(var(--accent-rgb), .2); border-radius: 999px; color: var(--accent-a); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(var(--accent-rgb), .06); }
.publication-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.publication-links .button { min-height: 2.65rem; padding-left: 1.15rem; padding-right: 1.15rem; border: 0; font-weight: 700; box-shadow: 0 7px 18px rgba(22,27,39,.12); transition: transform .2s ease, box-shadow .2s ease; }
.publication-links .button:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(22,27,39,.17); }
.publication-links .button.is-dark { background: linear-gradient(120deg, #202531, #11141b); }

/* Video / teaser */
.hero.teaser { background: #fff; }
.teaser .hero-body { padding: 2rem 1.5rem 4rem; }
.publication-video { border-radius: 18px !important; background: #11151d; box-shadow: 0 22px 55px rgba(22,27,39,.15); }
.publication-video iframe { border-radius: 18px; }
.teaser .subtitle { max-width: 880px; margin: 2rem auto 0; color: var(--page-muted); font-size: 1.08rem; line-height: 1.7; }

/* Content rhythm */
.section { padding: clamp(3.8rem, 7vw, 6rem) 1.5rem; }
.section:nth-of-type(even) { background: var(--page-soft); }
.section .title.is-3, #BibTeX .title { position: relative; margin-bottom: 2rem; font-size: clamp(1.7rem, 3vw, 2.25rem); }
.section .title.is-3::after, #BibTeX .title::after { content: ""; display: block; width: 3rem; height: 4px; margin: .7rem auto 0; border-radius: 9px; background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }
.section .has-text-left .title.is-3::after, #BibTeX .title::after { margin-left: 0; }
.section .title.is-4, .section h3 { margin-top: 2.6rem; margin-bottom: 1.1rem; color: #2b303b; }
.content { color: #383e49; font-size: 1rem; line-height: 1.78; }
.content.has-text-justified p { hyphens: auto; }
.content ul { margin-top: 1rem; }
.content li { margin-bottom: .55rem; }
.content li::marker { color: var(--accent-a); }
.content code { color: var(--accent-a); border-radius: 5px; background: rgba(var(--accent-rgb), .07); }

/* Research figures */
.section .column.is-four-fifths > img,
.section .content > img,
.section .content > div > img,
.section .content > p > img { display: block; max-width: 100%; margin: 1rem auto 1.4rem; padding: .5rem; border: 1px solid var(--page-line); border-radius: 15px; background: #fff; box-shadow: 0 14px 38px rgba(25,31,44,.07); }
.section img[width="80%"], .section img[width="90%"] { height: auto; }

/* NeAF audio benchmark */
body[data-project="neaf"] .row.justify-content-left { margin: 1.1rem 0 1.5rem; padding: 1.1rem .35rem; border: 1px solid var(--page-line); border-radius: 15px; background: #fff; box-shadow: 0 10px 30px rgba(35,29,48,.055); }
body[data-project="neaf"] .row.justify-content-left h5 { min-height: 2.4rem; display: grid; place-items: center; color: #464c59; font-size: .88rem; font-weight: 700; }
body[data-project="neaf"] audio { height: 38px; margin-top: .4rem; border-radius: 99px; }
body[data-project="neaf"] .row img, body[data-project="neaf"] .col-sm-3 > img { border: 1px solid var(--page-line); border-radius: 9px; background: #fff; }
body[data-project="neaf"] .row p[style*="position: absolute"] { padding: .25rem .4rem; border-radius: 5px; font-size: .72rem; box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* Citation and footer */
#BibTeX { background: #f2f4f7; }
#BibTeX pre { position: relative; padding: 1.6rem; overflow-x: auto; border: 1px solid #343a48; border-radius: 14px; color: #dce3ef; background: #171b24; box-shadow: 0 15px 35px rgba(22,27,39,.12); }
#BibTeX pre code { color: inherit; background: transparent; }
.shared-copy-button { float: right; margin: .15rem .15rem .7rem .7rem; padding: .45rem .75rem; border: 1px solid #d9dce3; border-radius: 8px; color: #3f4652; cursor: pointer; font-weight: 700; background: #fff; }
.footer { padding: 3rem 1.5rem; color: #7a818d; background: #eef0f3; }
.footer .content { color: inherit; font-size: .86rem; line-height: 1.65; }

/* Lightbox */
.polish-lightbox { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; padding: 3.5rem 2rem 2rem; background: rgba(8,10,15,.93); cursor: zoom-out; }
.polish-lightbox[hidden] { display: none; }
.polish-lightbox img { max-width: 96vw; max-height: 90vh; object-fit: contain; border-radius: 8px; background: #fff; }
.polish-lightbox button { position: fixed; top: 1rem; right: 1.25rem; border: 0; color: #fff; cursor: pointer; font-size: 2.6rem; background: transparent; }
.polishable-image { cursor: zoom-in; transition: transform .25s ease, box-shadow .25s ease; }
.polishable-image:hover { transform: translateY(-2px); box-shadow: 0 18px 45px rgba(25,31,44,.13) !important; }

.js-polish .polish-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js-polish .polish-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1023px) {
  .navbar-menu { padding: .7rem; background: rgba(255,255,255,.98); box-shadow: 0 12px 30px rgba(22,27,39,.09); }
  .navbar-dropdown { box-shadow: none; }
  .page-nav-item { padding-left: 1rem; border-top: 1px solid #f0f1f4; }
  .project-nav .research-toggle { width: 100%; justify-content: flex-start; padding-left: .75rem; }
  .project-nav .research-menu .navbar-dropdown { display: none; padding-left: .75rem; border: 0; }
  .project-nav .research-menu.is-active .navbar-dropdown { display: block; }
}

@media (max-width: 768px) {
  body > .hero:first-of-type .hero-body { padding: 2.8rem 1rem 3.2rem; }
  .publication-title { font-size: clamp(2rem, 10vw, 3rem) !important; }
  .publication-authors { font-size: .95rem !important; }
  .section { padding: 3.8rem 1rem; }
  .section .column.is-four-fifths { padding-left: .2rem; padding-right: .2rem; }
  .content.has-text-justified { text-align: left !important; }
  .teaser .hero-body { padding-left: .7rem; padding-right: .7rem; }
  .publication-video, .publication-video iframe { border-radius: 11px !important; }
  body[data-project="neaf"] .row.justify-content-left { padding: 1rem .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
